Submission #362554

# Submission time Handle Problem Language Result Execution time Memory
362554 2021-02-03T16:17:02 Z Tenis0206 Subway (info1cup19_subway) C++11
0 / 100
1 ms 364 KB
#include <iostream>
#include <vector>

using namespace std;
int k;
vector<pair<int,int>> rez;
int main()
{
    cin>>k;
    int nod = 0;
    int per = 0;
    while(per<k)
    {
        if(per+nod<=k)
        {
            per+=nod;
            rez.push_back({nod+1,nod});
            ++nod;
            continue;
        }
        rez.push_back({nod+1,k-per});
        break;
    }
    cout<<nod+1<<endl;
    for(auto it : rez)
    {
        cout<<it.first-1<<' '<<it.second-1<<endl;
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -