| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367534 | rana_azka | Lego Wall (EGOI22_legowall) | C++20 | 0 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1e18;
const int MOD = 1e9+7;
const int MAXN = 2e5;
int n, m;
int mul(int a, int b){
return ((a % MOD) * (b % MOD)) % MOD;
}
int modex(int basis, int pangkat){
if(pangkat == 0) return 1;
if(pangkat == 1) return basis;
int ret = modex(basis, pangkat/2);
ret = mul(ret, ret);
if(pangkat % 2) ret = mul(basis, ret);
return ret;
}
void solve(){
cin >> n >> m;
int ans = 0;
// subtask 2
if(n == 1){
cout << 1 << endl;
return ;
}
if(n == 2){
cout << 3 << endl;
return ;
}
ans = 2;
cout << ans << endl;
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int tc = 1;
// cin >> tc;
while(tc--){
solve();
}
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
