hihoCoder太阁最新面经算法竞赛12 register

Ended

Participants:164

Verdict:Accepted
Score:100 / 100
Submitted:2016-10-24 14:17:39

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 <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
//string MAX="2359";
string mStr="0000";
bool valid=false;
bool isValid(string time)
{
    bool flag=false;
    char up;
    switch(time[0])
    {
    case '0':
    case '1':
        up='9';
        break;
    case '2':
        up='3';
        break;
    default:
        return false;
    }
    if(time[1]>up)
        return false;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX