Submission #681686

# Submission time Handle Problem Language Result Execution time Memory
681686 2023-01-13T17:12:37 Z qwerasdfzxcl MalnaRISC (COI21_malnarisc) C++17
76.4122 / 100
1 ms 344 KB
#include <bits/stdc++.h>

typedef long long ll;
using namespace std;

void print(int i, int j){
    printf("CMPSWP R%d R%d ", i, j);
}

int main(){
    int n;
    scanf("%d", &n);
    printf("%d\n", n);
    for (int i=1;i<=n;i++){
        for (int j=2-(i%2);j+1<=n;j+=2) print(j, j+1);
        printf("\n");
    }
    return 0;
}

Compilation message

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