結果
問題 |
No.522 Make Test Cases(テストケースを作る)
|
ユーザー |
![]() |
提出日時 | 2024-09-30 01:53:13 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 972 ms / 2,000 ms |
コード長 | 408 bytes |
コンパイル時間 | 733 ms |
コンパイル使用メモリ | 91,732 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-09-30 01:53:20 |
合計ジャッジ時間 | 3,719 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll n; cin>>n; for(ll a = 1;a<=n;a++){ for(ll b = a;b<=n;b++){ if(a+b>=n) break; ll c = n - a - b; if(c<b) continue; cout<<a<<" "<<b<<" "<<c<<endl; } } }