結果
問題 |
No.497 入れ子の箱
|
ユーザー |
|
提出日時 | 2017-03-25 22:19:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 434 bytes |
コンパイル時間 | 1,582 ms |
コンパイル使用メモリ | 170,976 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 06:16:05 |
合計ジャッジ時間 | 5,951 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 29 |
コンパイルメッセージ
main.cpp: In member function 'int c::in(int*)': main.cpp:5:61: warning: no return statement in function returning non-void [-Wreturn-type] 5 | class c{public:int x,y,z;int in(int s[]){x=*s,y=s[1],z=s[2];}}; | ^ main.cpp: At global scope: main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main() | ^~~~
ソースコード
#include<bits/stdc++.h> #define m(a,b) a=a<(b)?(b):a using namespace std; vector<int>G[1000]; class c{public:int x,y,z;int in(int s[]){x=*s,y=s[1],z=s[2];}}; int t[1000],s,n,i,j,x[3];c a[1000]; main() { for(cin>>n;cin>>*x>>x[1]>>x[2];a[i++].in(x))sort(x,x+3); for(;i--;)for(j=n;j--;)if(a[j].x<a[i].x&&a[j].y<a[i].y&&a[j].z<a[i].z)G[i].push_back(j); for(;++i<n;m(s,t[i]+1))for(j=0;j<G[i].size();j++)m(t[i],t[j]+1); cout<<s<<endl; }