제출 #675386

#제출 시각아이디문제언어결과실행 시간메모리
675386Hiennoob123Football (info1cup20_football)C++14
0 / 100
25 ms488 KiB
//#pragma GCC optimize("Ofast,unroll-loops") //#pragma GCC target("avx,avx2,fma,sse4.2") #include<bits/stdc++.h> #define ll long long #define int long long #define ii __int128 #define ld long double #define cd complex<ld> #define pll pair<int,int> #define pii pair<int,int> #define pld pair<ld,ld> #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; ll n, k; ll A[100005]; void solve() { cin >> n >> k; ll sum1 = 0, sum2 = 0; for(int i = 1; i<=n ; i++) { cin >> A[i]; sum1+=A[i]; sum2 += A[i]/2; } sort(A+1,A+n+1); if(n%2==1) { cout << 1; return; } for(int i = 1; i<= n; i+=2) { if(A[i]!=A[i-1]) { cout << 0; return; } } cout << 1; } signed main() { ios_base::sync_with_stdio(NULL) ; cin.tie(nullptr) ; cout.tie(nullptr); int t = 1; cin >> t; //cout << -1; while(t--) { solve(); // cout << "\n"; } }
#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...