Submission #711699

# Submission time Handle Problem Language Result Execution time Memory
711699 2023-03-17T11:22:18 Z scottchou Popcount (COCI19_popcount) C++17
0 / 110
1 ms 340 KB
#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
1 Incorrect 0 ms 212 KB Wrong output format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Wrong output format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Wrong output format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Wrong output format.
2 Halted 0 ms 0 KB -