Submission #6771

#TimeUsernameProblemLanguageResultExecution timeMemory
6771Namnamseo돌 옮기기 (GA7_stone)C++98
6 / 100
0 ms1088 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...