Submission #693843

# Submission time Handle Problem Language Result Execution time Memory
693843 2023-02-03T09:58:20 Z 79brue MalnaRISC (COI21_malnarisc) C++17
76.4122 / 100
2 ms 340 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int n;

int main(){
    scanf("%d", &n);
    printf("%d\n", n);
    if(n==2){
        printf("1\nCMPSWP R1 R2");
        return 0;
    }
    for(int i=1; i<=n; i++){
        for(int j=(i-1)%2+1; j<n; j+=2){
            printf("CMPSWP R%d R%d ", j, j+1);
        }
        printf("\n");
    }
}

Compilation message

malnarisc.cpp: In function 'int main()':
malnarisc.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 300 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 212 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 212 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 212 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 300 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 212 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 340 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 340 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 340 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 340 KB Partially correct