QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#744400#9623. 合成大西瓜tianchenWA 0ms3628kbC++20339b2024-11-13 21:48:562024-11-13 21:49:02

Judging History

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

  • [2024-11-13 21:49:02]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3628kb
  • [2024-11-13 21:48:56]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int a[100010];
int main()
{
    int n,m;
    cin>>n>>m;
    for(int i=1; i<=n; i++)
    {
        cin>>a[i];
    }
    sort(a+1,a+1+n,[](int x,int y)
    {
        return x<y;
    });
    if(n!=1)
        cout<<a[2]<<endl;
    else
        cout<<a[1]<<endl;
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

7 9
1 4 1 3 3 6 7
5 4
3 6
3 4
2 3
5 2
2 6
6 7
5 1
4 6

output:

1

result:

wrong answer 1st lines differ - expected: '6', found: '1'