Submission #823850

#TimeUsernameProblemLanguageResultExecution timeMemory
823850rainboyFlip it and Stick it (CCO23_day2problem1)C11
1 / 25
1 ms660 KiB
#include <stdio.h> #include <string.h> #define N 200000 int main() { static char aa[N + 1], bb[4]; int n, m, i; scanf("%s%s", aa, bb), n = strlen(aa), m = strlen(bb); if (m == 1) { for (i = 0; i < n; i++) if (aa[i] == bb[0]) { printf("-1\n"); return 0; } printf("0\n"); } return 0; }

Compilation message (stderr)

Main.c: In function 'main':
Main.c:10:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  scanf("%s%s", aa, bb), n = strlen(aa), m = strlen(bb);
      |  ^~~~~~~~~~~~~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...