Submission #1084426

# Submission time Handle Problem Language Result Execution time Memory
1084426 2024-09-06T08:37:01 Z laure Lutrija (COCI19_lutrija) C++14
0 / 70
1 ms 348 KB
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    vector<bool>vis(1005,0);
    set<int>p;
    for(int i=2;i<=1000;i++)
    {
        if(!vis[i])
        {
            p.insert(i);
            for(int j=i*i;j<=1000;j+=i)vis[j]=1;
        }
    }
    int a,b;
    cin>>a>>b;
    if(p.count(abs(a-b))){cout<<a<<" "<<b<<'\n';return 0;}
    int ans=-1;
    for(auto u:p)
    {
        if(p.count(abs(a-u))&&p.count(abs(b-u)))
        {
            ans=u;
            break;
        }
    }
    cout<<a<<" "<<ans<<" "<<b<<'\n';
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Integer parameter [name=array length] equals to 641, violates the range [-1, 30]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Integer parameter [name=array length] equals to 419, violates the range [-1, 30]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Integer parameter [name=array length] equals to 347, violates the range [-1, 30]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Integer parameter [name=arr[1]] equals to -1, violates the range [1, 1000000000000000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Expected int32, but "55866324786191" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Expected int32, but "64692946913459" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Expected int32, but "91496766123197" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Expected int32, but "93099215060987" found
2 Halted 0 ms 0 KB -