結果

問題 No.497 入れ子の箱
ユーザー kotatsugamekotatsugame
提出日時 2017-03-25 22:19:00
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 434 bytes
コンパイル時間 1,593 ms
コンパイル使用メモリ 169,460 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-09-20 10:48:33
合計ジャッジ時間 6,565 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: メンバ関数 ‘int c::in(int*)’ 内:
main.cpp:5:61: 警告: 非 void を戻す関数内に return 文がありません [-Wreturn-type]
    5 | class c{public:int x,y,z;int in(int s[]){x=*s,y=s[1],z=s[2];}};
      |                                                             ^
main.cpp: 大域スコープ:
main.cpp:7:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    7 | main()
      | ^~~~

ソースコード

diff #

#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;
}
0