Submission #921589

#TimeUsernameProblemLanguageResultExecution timeMemory
921589vjudge1Lightning Rod (NOI18_lightningrod)C++17
0 / 100
1041 ms262144 KiB
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; void solve(){ ll a; cin>>a; vector<pair<ll,ll> > v; for(ll i=1;i<=a;i++){ ll x,y; cin>>x>>y; v.pb({y,x}); } sort(v.begin(),v.end()); if(v[0].first==v[v.size()-1].first){ cout<<a; return ; } } int main() { ios_base::sync_with_stdio(0),cin.tie(0); ll t=1,i=1; //cin>>t; while(t--){ //cout<<"Case "; //cout<<i<<':'<<"\n"; //i++; solve(); } return 0; }

Compilation message (stderr)

lightningrod.cpp: In function 'int main()':
lightningrod.cpp:25:12: warning: unused variable 'i' [-Wunused-variable]
   25 |     ll t=1,i=1;
      |            ^
#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...