# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
222490 |
2020-04-13T08:20:11 Z |
lyc |
Popcount (COCI19_popcount) |
C++14 |
|
5 ms |
384 KB |
#include <bits/stdc++.h>
using namespace std;
#define SZ(x) (int)(x).size()
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define RFOR(i,a,b) for (int i=(a);i>=(b);--i)
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, K; cin >> N >> K;
vector<string> ans;
for (int i = 1; i <= N-1; ++i) {
string cur = "A=(";
cur += "(A&(0-(1<<" + to_string(i) + ")))";
cur += "+";
cur += "((A>>" + to_string(i) + ")&1)";
cur += ")";
ans.push_back(cur);
}
cout << SZ(ans) << '\n';
for (auto& s : ans) cout << s << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
Wrong answer. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
Incorrect number of commands. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Accepted. |
2 |
Incorrect |
4 ms |
384 KB |
Incorrect number of commands. |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
Incorrect number of commands. |
2 |
Halted |
0 ms |
0 KB |
- |