Submission #72531

#TimeUsernameProblemLanguageResultExecution timeMemory
72531IDxTree (#118)Judge Against Wrong Code (FXCUP3_judge)C++17
10 / 100
193 ms3488 KiB
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_map> #include <functional> #include <cstring> #include <cmath> #include <ctime> #include <cstdlib> using namespace std; typedef long long llong; typedef long double ld; typedef pair<int, int> pii; typedef pair<llong, llong> pll; int x, d, c; int dat[500000]; int cod[500000]; char in[50]; char ans[500001]; int main() { scanf("%d%d", &x, &d); for (int i = 0; i < d; ++i) { scanf("%s", in); for (int j = 0; j < x; ++j) { dat[i] <<= 1; if (in[j] == 'o') dat[i] ^= 1; } } scanf("%d", &c); for (int i = 0; i < c; ++i) { scanf("%s", in); for (int j = 0; j < x; ++j) { cod[i] <<= 1; if (in[j] == '.') cod[i] ^= 1; } } for (int i = 0; i <= c; ++i) ans[i] = 'x'; for (int i = 0; i < (1 << d); ++i) { int x = 0; for (int j = 0; j < d; ++j) { if ((i >> j) & 1) x |= dat[j]; } int cnt = 0; for (int j = 0; j < c; ++j) { if ((x & cod[j]) != x) ++cnt; } ans[cnt] = 'o'; } printf("%s\n", ans + 1); return 0; }

Compilation message (stderr)

judge.cpp: In function 'int main()':
judge.cpp:27:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d", &x, &d);
     ~~~~~^~~~~~~~~~~~~~~~
judge.cpp:29:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%s", in);
         ~~~~~^~~~~~~~~~
judge.cpp:35:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &c);
     ~~~~~^~~~~~~~~~
judge.cpp:37:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%s", in);
         ~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...