QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#250678#6431. Oops, It's Yesterday Twice Morehhoppitree#WA 0ms3876kbC++14591b2023-11-13 15:37:372023-11-13 15:37:38

Judging History

你现在查看的是最新测评结果

  • [2023-11-13 15:37:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3876kb
  • [2023-11-13 15:37:37]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

const int N = 1e5 + 5;

int a[N];

signed main()
{
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &a[i]);
    }
    for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= n; ++j) {
            if (a[i] < a[j]) {
                swap(a[i], a[j]);
                ++a[0];
            }
        }
        printf("%d: ", a[0]);
        for (int j = 1; j <= n; ++j) {
            printf("%d%c", a[j], " \n"[j == n]);
        }
    }
    printf("%d\n", a[0]);
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3876kb

input:

3 3 3

output:

0: 3 3 0
0: 3 3 0
1: 0 3 3
1

result:

wrong answer Line "0: 3 3 0" doesn't correspond to pattern "[UDLR]{0,1500}"