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;
int const N = 505;
string s[N];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
for(int i = 0; i < n; i++){
s[i] = "((A&(1<<";
if(i >= 10){
s[i].push_back((char)(i / 10 + '0'));
}
s[i].push_back((char)(i % 10 + '0'));
s[i] = s[i] + "))>>";
if(i >= 10){
s[i].push_back((char)(i / 10 + '0'));
}
s[i].push_back((char)(i % 10 + '0'));
s[i].push_back(')');
cout << s[i] << '\n';
}
cout << 1 << '\n';
cout << "A=";
for(int i = 0; i < n - 1; i++){
cout << '(';
}
cout << s[0];
for(int i = 1; i < n; i++){
cout << '+';
cout << s[i];
cout << ')';
}
cout << '\n';
}
# | 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... |