Task: | Sukujuhla |
Sender: | siirikuoppala |
Submission time: | 2017-01-19 13:08:12 +0200 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | UNKNOWN | 0 |
#2 | UNKNOWN | 0 |
#3 | UNKNOWN | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | UNKNOWN | -- | 1 | details |
#2 | UNKNOWN | -- | 2 | details |
#3 | UNKNOWN | -- | 3 | details |
Code
#include <iostream> #include <vector> using namespace std; #define N (1<<18) int t[N], V, c[N]; vector<int> v; int main(){ int n; cin >> n; v.push_back(0); while(n>1){ if(n==4 || n%2==1){ v.push_back(1); //add n-=3; }else{ n/=2; v.push_back(2); //mul } } if(n!=1){ cout << "0\n"; return 0; } cout << v.size() << "\n"; for(unsigned int i=v.size()-1; i>=0; --i){ if(v[i]==0) cout << "END\n"; else if(v[i]==1) cout << "ADD\n"; else cout << "MUL\n"; } }
Test details
Test 1
Group: 1
Verdict: UNKNOWN
input |
---|
#!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
correct output |
---|
50 |
user output |
---|
(not available) |
Test 2
Group: 2
Verdict: UNKNOWN
input |
---|
#!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
correct output |
---|
50 |
user output |
---|
(not available) |
Test 3
Group: 3
Verdict: UNKNOWN
input |
---|
#!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
correct output |
---|
50 |
user output |
---|
(not available) |