# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
571004 | 2022-06-01T02:18:23 Z | AGE | Lutrija (COCI19_lutrija) | C++14 | 20 ms | 16184 KB |
#include<bits/stdc++.h> #define F first #define S second #define pb push_back #define int long long using namespace std; const int N=1e6,M=2e3; int seive[N+5]; main(){ int a,b; cin>>a>>b; for(int i=2;i<=1e6;i++){ if(seive[i]!=0) continue; for(int j=i+i;j<=1e6;j+=i) seive[j]=1; } int x=abs(a-b); if(seive[x]==1&&seive[a+b]==1) cout<<"-1"<<endl; if(seive[abs(a-b)]==0) cout<<2<<endl<<a<<" "<<b<<endl; else if(seive[a+b]==0) cout<<3<<endl<<a<<" "<<a+b<<" "<<b<<endl; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 8120 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 11 ms | 8112 KB | Output is correct |
2 | Incorrect | 12 ms | 8020 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 13 ms | 8128 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 13 ms | 8132 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 17 ms | 8020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 13 ms | 8112 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 20 ms | 16184 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 20 ms | 16152 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 19 ms | 16180 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 20 ms | 16180 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |