# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
632587 | 2022-08-20T11:28:16 Z | Mahdi | Jail (JOI22_jail) | C++17 | 1 ms | 340 KB |
#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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 4 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 4 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 4 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 4 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 4 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 4 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 4 |
2 | Halted | 0 ms | 0 KB | - |