이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int MAXK = 55 ;
const int MAXN = 1e6+10 ;
int arr[MAXK][MAXN] , sz[MAXK];
int k ;
int main()
{
int n ;
cin>>n ;
for(int i = 0 ; i < n ; ++i)
{
cin>>sz[i] ;
for(int j = 0 ; j < sz[i] ; ++j)
cin>>arr[i][j] ;
}
for(int i = 0 ; i < n ; ++i)
{
for(int i2 = 0 ; i2 < sz[i] ; ++i2)
{
int a = arr[i][i2] ;
for(int j = i+1 ; j < n ; ++j)
{
for(int j2 = 0 ; j2 < sz[j] ; ++j2)
{
int b = arr[j][j2] ;
for(int k = j+1 ; k < n ; ++k)
{
for(int k2 = 0 ; k2 < sz[k] ; ++k2)
{
int c = arr[k][k2] ;
if(a < b+c && b < a+c && c < a+b)
return cout<<i+1<<" "<<a<<" "<<j+1<<" "<<b<<" "<<k+1<<" "<<c<<"\n" , 0 ;
}
}
}
}
}
}
return cout<<"NIE\n" , 0 ;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |