답안 #1006945

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1006945 2024-06-24T10:09:50 Z Nexus A Plus B (IOI23_aplusb) C++17
10 / 100
0 ms 348 KB
#include <bits/stdc++.h>
#include "aplusb.h"
#define ll long long

using namespace std;

const ll N=2e5+9,M=2e18+9,mod=998244353;

vector<int>smallest_sums(int n,vector<int>a,vector<int>b)
{
    vector<int>ans;
    multiset<ll>s;
    for(ll i=0;i<n;++i)
    {
        if(i==n-1)
        {
            for(ll j=0;j<n;++j)s.insert(a[i]+b[j]);
            break;
        }
        for(ll j=0;j<n;++j)
        {
            s.insert(a[i]+b[j]);
            if(a[i]+b[j]>a[i+1]+b[0])break;
        }
    }
    ll x=0;
    for(auto i:s)
    {
        ans.push_back(i);
        ++x;
        if(x==n)break;
    }
    return ans;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 348 KB 1st lines differ - on the 11th token, expected: '65', found: '90'
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 348 KB 1st lines differ - on the 11th token, expected: '65', found: '90'
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 348 KB 1st lines differ - on the 11th token, expected: '65', found: '90'
8 Halted 0 ms 0 KB -