Submission #404270

# Submission time Handle Problem Language Result Execution time Memory
404270 2021-05-14T04:09:56 Z tqbfjotld MalnaRISC (COI21_malnarisc) C++14
76.4122 / 100
2 ms 332 KB
///partial marks?
#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    scanf("%d",&n);
    printf("%d\n",n);
    for (int x = 0; x<n; x++){
        if (x&1){
            for (int y = 2; y+1<=n; y+=2){
                printf("CMPSWP R%d R%d ",y,y+1);
            }
        }
        else{
            for (int y = 1; y+1<=n; y+=2){
                printf("CMPSWP R%d R%d ",y,y+1);
            }
        }
        printf("\n");
    }
}

Compilation message

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