제출 #596197

#제출 시각아이디문제언어결과실행 시간메모리
596197ibm2006Team Contest (JOI22_team)C++14
17 / 100
2087 ms1180 KiB
#include<bits/stdc++.h> using namespace std; typedef long long int ll; ll n,i,x,y,z,t,s,j,k; map<pair<ll,pair<ll,ll>>,ll> m; pair<ll,pair<ll,ll>> a[3],p[110000]; int main() { scanf("%lld",&n); for(i=1;i<=n;i++) { scanf("%lld %lld %lld",&x,&y,&z); if(m[{x,{y,z}}]==1) continue; m[{x,{y,z}}]=1; t++; p[t]={x,{y,z}}; } n=t; for(i=1;i<=n;i++) for(j=i+1;j<=n;j++) for(k=j+1;k<=n;k++) { a[0]=p[i]; a[1]=p[j]; a[2]=p[k]; sort(a,a+3); if(a[2].first==a[1].first) continue; if(a[1].second.first>a[0].second.first&&a[1].second.first>a[2].second.first) { if(a[0].second.second>a[1].second.second&&a[0].second.second>a[2].second.second) { s=max(s,a[2].first+a[0].second.second+a[1].second.first); continue; } } else if(a[0].second.first>a[1].second.first&&a[0].second.first>a[2].second.first) { if(a[1].second.second>a[0].second.second&&a[1].second.second>a[2].second.second) { s=max(s,a[1].second.second+a[0].second.first+a[2].first); continue; } } } if(s==0) s--; printf("%lld",s); }

컴파일 시 표준 에러 (stderr) 메시지

team.cpp: In function 'int main()':
team.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |     scanf("%lld",&n);
      |     ~~~~~^~~~~~~~~~~
team.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         scanf("%lld %lld %lld",&x,&y,&z);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...