# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
496002 |
2021-12-20T11:09:49 Z |
ktkerem |
Sob (COCI19_sob) |
C++17 |
|
3 ms |
460 KB |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef __int128 vll;
typedef unsigned __int128 uvll;
ll _i=0;
#define ffn(x) _i=x
#define llll pair<ll , ll>
#define stitr set<ll>::iterator
#define fora(y,x) for(ll y=_i;x>y;y++)
#define pb push_back
#define pf push_front
#define debu cout << "hello\n"
#define fi first
#define sec second
#define all(a) a.begin() , a.end()
const ll limit = 1e13 + 7;
const ll ous=1e5 + 5;
const ll dx[4] = {0 , -1 , 1 , 0} , dy[4] = {1,0,0,-1};
ll bt[ous];
void solve(){
ll n , m;cin >> n >> m;
ll z =m+n-1;
bt[0] = bt[1]=m;
for(ll i = m;z>=i;i++){
ll o = i;
for(ll j = 2;i >= j*j;j++){
if(i%j == 0){
bt[i/j] = i;
bt[j] = i;
}
}
}
fora(i,n){
cout << i << " " << bt[i] << "\n";
}
return;/**/
}
signed main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
ll t=1;
//cin >> t;
while(t--){
solve();
}
return 0;
}
Compilation message
sob.cpp: In function 'void solve()':
sob.cpp:27:12: warning: unused variable 'o' [-Wunused-variable]
27 | ll o = i;
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |