Submission #944470

#TimeUsernameProblemLanguageResultExecution timeMemory
944470Captain_GeorgiaFootball (info1cup20_football)C++17
0 / 100
1 ms600 KiB
#include <bits/stdc++.h> using namespace std; #define file \ freopen("in.txt" , "r" , stdin); \ freopen("out.txt" , "w" , stdout); typedef long long ll; void test_case () { int n , k; cin >> n >> k; ll sum = 0; int a[n]; for (int i = 0;i < n;i ++) { cin >> a[i]; } for (int x = 1;x <= k;x *= 2) { sum = 0; for (int i = 0;i < n;i ++) { sum += (a[i] / x); } if (sum %2 != 0) { cout << "1"; return; } } cout << "0"; } int32_t main () { file int TIME = clock(); int t = 1; cin >> t; while (t --) { test_case(); } cerr << "\nTime elapsed: " << (clock() - TIME) * 1000.0 / CLOCKS_PER_SEC << " ms\n"; }

Compilation message (stderr)

football.cpp: In function 'int32_t main()':
football.cpp:5:20: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
    5 |             freopen("in.txt" , "r" , stdin); \
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
football.cpp:33:6: note: in expansion of macro 'file'
   33 |      file
      |      ^~~~
football.cpp:6:20: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |             freopen("out.txt" , "w" , stdout);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
football.cpp:33:6: note: in expansion of macro 'file'
   33 |      file
      |      ^~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...