Submission #199767

#TimeUsernameProblemLanguageResultExecution timeMemory
199767SamAndPopcount (COCI19_popcount)C++17
15 / 110
6 ms376 KiB
#include <bits/stdc++.h> using namespace std; int n, k; void solv1() { cout << k << endl; for (int i = 1; i <= k; ++i) { /*string ii; string s; string ast = "(1<<" + ii + ")"; s = "A"; s = "(" + s + "-" + ast + ")"; s = "(" + s + "+" + ast + ")";*/ cout << "A=((A-(A&"; cout << "(1<<" << i << ")))"; cout << "+((A&"; cout << "(1<<" << i << "))"; cout << ">>" << i << "))\n"; } } int main() { cin >> n >> k; if (2 <= n && n <= 100 && k == n - 1) solv1(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...