結果

問題 No.2358 xy+yz+zx=N
コンテスト
ユーザー 👑 tails
提出日時 2023-06-23 22:33:10
言語 cLay
(20250308-1 + boost 1.89.0)
コンパイル:
clayc _filename_
実行:
./a.out
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 316 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,404 ms
コンパイル使用メモリ 198,084 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-22 19:25:51
合計ジャッジ時間 4,372 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

ll@n;
set<array<int,3>>s;
rep(x,1,3162){
	rep(y,x+1){
		if((n-x*y)%(x+y)==0){
			int z=(n-x*y)/(x+y);
			if(z>=x){
				s.insert({x,y,z});
				s.insert({x,z,y});
				s.insert({y,x,z});
				s.insert({y,z,x});
				s.insert({z,x,y});
				s.insert({z,y,x});
			}
		}
	}
}
wt(int(s.size()));
for(auto a:s){
	wt((a)(3));
}
0