/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 540.0 KiB
#2 Wrong Answer 12ms 540.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
const long long M=1e7+1,MOD=1000000007;
typedef long long ll;
#define double long double
#define debug(x) cout<<x<<endl

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t;
    cin>>t;
    while(t--)
    {
       int n;
       cin>>n;
       vector<int>v;
       for(int i=1;i<=n*n;i++){
        int a;
        cin>>a;
        v.push_back(a);
       }
       sort(v.begin(),v.end());
       cout<<v[0]+v[n-2]<<"\n";
    }


    return 0;
 
}

Information

Submit By
Type
Submission
Problem
P1065 Matrix Sum
Language
C++20 (G++ 13.2.0)
Submit At
2024-05-30 17:54:03
Judged At
2024-11-11 03:29:11
Judged By
Score
0
Total Time
12ms
Peak Memory
540.0 KiB