제출 #387597

#제출 시각아이디문제언어결과실행 시간메모리
387597casperwangFootball (info1cup20_football)C++14
0 / 100
31 ms580 KiB
#include <bits/stdc++.h> using namespace std; #define debug(args) kout("[ " + string(#args) + " ]", args) void kout() { cerr << endl; } template <class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ',kout(b...); } template <class T> void pary(T L, T R) { while (L != R) cerr << *L << " \n"[++L==R]; } int T, N, K; int a; string ans; map <int,int> cnt; inline int lb(int a) { return a &- a; } signed main() { ios_base::sync_with_stdio(0), cin.tie(0); cin >> T; while (T--) { cin >> N >> K; cnt.clear(); for (int i = 0; i < N; i++) { cin >> a; cnt[lb(a)]++; } bool flag = false; for (auto [v, c] : cnt) { flag |= c % 2; if (v > K) break; } ans += (flag ? '1' : '0'); } cout << ans << '\n'; }

컴파일 시 표준 에러 (stderr) 메시지

football.cpp: In function 'int main()':
football.cpp:28:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   28 |   for (auto [v, c] : cnt) {
      |             ^
#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...