結果
| 問題 | No.522 Make Test Cases(テストケースを作る) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-26 08:52:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 2,000 ms |
| コード長 | 697 bytes |
| コンパイル時間 | 1,576 ms |
| コンパイル使用メモリ | 193,652 KB |
| 最終ジャッジ日時 | 2025-02-15 19:11:59 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
#include <bits/stdc++.h>
#define gcu getchar_unlocked
#define pcu putc_unlocked
#define all(x) x.begin(),x.end()
#define endln() pcu('\n',stdout)
#define space() pcu(' ',stdout)
using namespace std;
int iin(){int r=0,s=1;int c=gcu();while(isspace(c))c=gcu();if(c=='-'){s=-1;c=gcu();}for(;!isspace(c);c=gcu())r=r*10+(c-'0');ungetc(c,stdin);return s*r;}
void iout(int n){if(n<0){pcu('-',stdout);n=-n;}if(n<10){pcu('0'+n,stdout);return;}int i;char b[21];b[20]=0;for(i=20;n>0;b[--i]='0'+n%10,n/=10);fputs(b+i,stdout);}
int main() {
int n = iin();
for (int i = 1; i <= n / 3; i++) {
for (int j = i; j <= (n - i) / 2; j++) {
iout(i); space(); iout(j); space(); iout(n - i - j); endln();
}
}
}