結果
問題 | No.1519 Diversity |
ユーザー | spipipike |
提出日時 | 2021-06-02 13:14:30 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 400 bytes |
コンパイル時間 | 1,806 ms |
コンパイル使用メモリ | 172,904 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-04-27 01:07:02 |
合計ジャッジ時間 | 3,127 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int,int>; int main(){ int n; cin>>n; vector<P> ans; vector<int> deg(n); rep(i, n){ int m=i-deg[i]; if(i+m>=n) break; rep(j, m){ ans.push_back(P(i, i+1+j)); deg[i+1+j]++; } } for(P p : ans) cout<<(p.first+1)<<" "<<(p.second+1)<<endl; return 0; }