Submission #681687

# Submission time Handle Problem Language Result Execution time Memory
681687 2023-01-13T17:15:00 Z qwerasdfzxcl MalnaRISC (COI21_malnarisc) C++17
21.5885 / 100
1 ms 340 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-1);
    for (int i=1;i<=n-1;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 Incorrect 1 ms 212 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 212 KB Partially correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 340 KB Partially correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 340 KB Partially correct