[Offer收割]编程练习赛41 register

Ended

Participants:163

Verdict:Wrong Answer
Score:0 / 100
Submitted:2017-12-24 13:09:15

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <map>
#include <cmath>
#include <ctime>
#include <string>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
using namespace std;
bool match[60][400];
const int month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
// MM-DD
int dateToInt(string s) {
    int m = (s[0] - '0') * 10 + (s[1] - '0') - 1;
    int n = (s[3] - '0') * 10 + (s[4] - '0');
    if (m<0||m>11||n<1||n>31) return 399;
    return month[m] + n;
}
bool isValid() {
    int N,M;
    cin >> N >> M;
    for (int i = 1; i < N; ++i) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX