# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1139755 | Kerim | Permutation Recovery (info1cup17_permutation) | C++20 | 1092 ms | 3772 KiB |
#include "bits/stdc++.h"
using namespace std;
//const int MOD = (int) 1e9 + 7;
const int K = 2;
vector<int> mods;
struct Int {
vector<int> val;
Int(string s = "") {
for (auto& mod : mods) {
int ans = 0;
for (auto& c : s) {
ans = (ans * 10ll + c - '0') % mod;
}
val.push_back(ans);
}
}
Int& operator+=(const Int& other) {
for (int i = 0; i < (int) mods.size(); i++) {
val[i] += other.val[i];
if (val[i] >= mods[i]) {
val[i] -= mods[i];
}
}
return *this;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |