Submission #1057477

#TimeUsernameProblemLanguageResultExecution timeMemory
1057477beaconmcGift Exchange (JOI24_ho_t4)C++14
0 / 100
11 ms2040 KiB
#include <bits/stdc++.h> typedef long long ll; #define FOR(i,x,y) for(ll i=x; i<y; i++) #define FORNEG(i,x,y) for(ll i=x; i>y; i--) using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); ll n; cin >> n; vector<ll> vals(n), req(n); FOR(i,0,n) cin >> vals[i]; FOR(i,0,n) cin >> req[i]; ll q; cin >> q; FOR(i,0,q){ ll a,b; cin >> a >> b; a--;b--; bool flag = false; FOR(j,1,n){ if (req[j] != 2*n-1){ cout << "Yes"; flag = 1; break; } } if (!flag){ if (vals[0] == 2*n-2)cout << "No"; else cout << "Yes"; } } }
#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...