This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |