Submission #632587

#TimeUsernameProblemLanguageResultExecution timeMemory
632587MahdiJail (JOI22_jail)C++17
0 / 100
1 ms340 KiB
#include<bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; #define all(v) v.begin(), v.end() #define F first #define S second typedef pair<int, int> pii; typedef long long ll; int n, m; void sol(){ cout<<1/0; cin>>n; for(int i=1;i<n;++i){ int u, v; cin>>u>>v; if(u!=i && v!=u+1){ cout<<1/0; } } cin>>m; if(m!=2) cout<<1/0; int a, b, u, v; cin>>a>>b>>u>>v; if(a<b){ if(u<v){ ll x=1LL*(u-a)*(v-b); if(x>0) cout<<"YES\n"; else cout<<"NO\n"; } else{ if(v>b || u<a) cout<<"YES\n"; else cout<<"NO\n"; } } else{ if(u>v){ ll x=1LL*(u-a)*(v-b); if(x>0) cout<<"YES\n"; else cout<<"NO\n"; } else{ if(u>a || v<b) cout<<"YES\n"; else cout<<"NO\n"; } } } int main(){ ios_base::sync_with_stdio(0); cin.tie(0); int T; cin>>T; while(T--) sol(); }

Compilation message (stderr)

jail.cpp: In function 'void sol()':
jail.cpp:12:12: warning: division by zero [-Wdiv-by-zero]
   12 |     cout<<1/0;
      |           ~^~
jail.cpp:18:20: warning: division by zero [-Wdiv-by-zero]
   18 |             cout<<1/0;
      |                   ~^~
jail.cpp:23:16: warning: division by zero [-Wdiv-by-zero]
   23 |         cout<<1/0;
      |               ~^~
#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...