답안 #719678

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
719678 2023-04-06T13:29:36 Z lam Team Contest (JOI22_team) C++14
8 / 100
2000 ms 4612 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int maxn = 1e5 + 5e4 + 10;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
#define ff first
#define ss second
int n;
iii a[maxn];
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr); cout.tie(nullptr);
    cin>>n;
    for (int i=1; i<=n; i++) cin>>a[i].ff>>a[i].ss.ff>>a[i].ss.ss;
    int ans=-1;
    for (int i=1; i<=n; i++)
        for (int j=1; j<=n; j++)
            if (a[i].ff>a[j].ff&&a[j].ss.ff>a[i].ss.ff)
            for (int z=1; z<=n; z++)
                if (a[i].ff>a[z].ff&&a[j].ss.ff>a[z].ss.ff&&a[z].ss.ss>max(a[i].ss.ss,a[j].ss.ss)) ans=max(ans,a[i].ff+a[j].ss.ff+a[z].ss.ss);
    cout<<ans<<'\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 328 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 324 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 324 KB Output is correct
10 Correct 1 ms 328 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 27 ms 340 KB Output is correct
15 Correct 7 ms 328 KB Output is correct
16 Correct 12 ms 332 KB Output is correct
17 Correct 9 ms 328 KB Output is correct
18 Correct 19 ms 336 KB Output is correct
19 Correct 26 ms 212 KB Output is correct
20 Correct 12 ms 332 KB Output is correct
21 Correct 4 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 336 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 328 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 324 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 324 KB Output is correct
10 Correct 1 ms 328 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 27 ms 340 KB Output is correct
15 Correct 7 ms 328 KB Output is correct
16 Correct 12 ms 332 KB Output is correct
17 Correct 9 ms 328 KB Output is correct
18 Correct 19 ms 336 KB Output is correct
19 Correct 26 ms 212 KB Output is correct
20 Correct 12 ms 332 KB Output is correct
21 Correct 4 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 336 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Execution timed out 2055 ms 468 KB Time limit exceeded
27 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 328 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Execution timed out 2080 ms 4612 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 328 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Execution timed out 2080 ms 4612 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 328 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Execution timed out 2080 ms 4612 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 328 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Execution timed out 2080 ms 4612 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 328 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 324 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 324 KB Output is correct
10 Correct 1 ms 328 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 27 ms 340 KB Output is correct
15 Correct 7 ms 328 KB Output is correct
16 Correct 12 ms 332 KB Output is correct
17 Correct 9 ms 328 KB Output is correct
18 Correct 19 ms 336 KB Output is correct
19 Correct 26 ms 212 KB Output is correct
20 Correct 12 ms 332 KB Output is correct
21 Correct 4 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 336 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Execution timed out 2055 ms 468 KB Time limit exceeded
27 Halted 0 ms 0 KB -