Submission #374013

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3740132021-03-06 12:31:38gustasonASM (LMIO18_asm)C++11
0 / 100
1 ms492 KiB
#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') {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

asm.cpp: In function 'int main()':
asm.cpp:51:9: warning: unused variable 'best' [-Wunused-variable]
   51 |     int best = 100;
      |         ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...