# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1139752 | Kerim | Permutation Recovery (info1cup17_permutation) | C++20 | 1095 ms | 2880 KiB |
#include "bits/stdc++.h"
using namespace std;
vector<int>mods{(int) 1e9 + 7, 998244353};
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;
}
Int& operator-=(const Int& other) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |