# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
374013 | gustason | ASM (LMIO18_asm) | C++11 | 1 ms | 492 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
int n;
vector<pair<int, int>> b;
//void go(pair<int, int> a, bool print) {
// if (print) {
//
// }
//}
bool check(vector<pair<char, int>> ins) {
for(int i = 0; i < n; i++) {
int x = b[i].first;
for(auto j : ins) {
if (j.first == 'm') {
x *= j.second;
} else if (j.first == 'a') {
x += j.second;
}
if (x > b[i].second) return false;
}
if (x != b[i].second) return false;
}
return true;
}
void printAns(vector<pair<char, int>> ans) {
cout << ans.size() << "\n";
for(auto i : ans) {
if (i.first == 'm') {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |