Submission #560133

# Submission time Handle Problem Language Result Execution time Memory
560133 2022-05-11T06:12:03 Z AGE Nadan (COCI18_nadan) C++14
50 / 50
1 ms 308 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+10,mod=100000000000031;
vector<int>v;
int ans=0,a[50005][6],p_pow[5];
unordered_map<int,int>mp;

long long  summ(long long  x,long long  y){
    return ((x%mod)+(y%mod))%mod;
}

long long  mult(long long  x,long long  y){
    return ((x%mod)*(y%mod))%mod;
}

main()
{

    int n,m;
    cin>>m>>n;


    for(int i=0;i<n-1;i++)
        cout<<i+1<<endl,m-=(i+1);

    cout<<m<<endl;
    return 0;
}

Compilation message

nadan.cpp:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   20 | main()
      | ^~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 308 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 308 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct