Submission #6771

# Submission time Handle Problem Language Result Execution time Memory
6771 2014-07-06T04:32:10 Z Namnamseo 돌 옮기기 (GA7_stone) C++
6 / 100
0 ms 1088 KB
#include <cstdio>

int main()
{
    int n,r;
    scanf("%d%d",&r,&n); n<<=1;
    int i;
    int buf; char d,b=-1;
    for(i=0;i<n;i++){
        scanf("%d %c",&buf,&d);
        if(b==d){
            printf("-1");
            return 0;
        } else b=d;
    }
    printf("%d\n",r);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
6 Correct 0 ms 1088 KB Output is correct
7 Correct 0 ms 1088 KB Output is correct
8 Correct 0 ms 1088 KB Output is correct
9 Correct 0 ms 1088 KB Output is correct
10 Correct 0 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1088 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -