結果
問題 | No.5004 Room Assignment |
ユーザー |
|
提出日時 | 2021-11-29 03:35:41 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 141 ms / 5,000 ms |
コード長 | 551 bytes |
コンパイル時間 | 2,684 ms |
実行使用メモリ | 22,376 KB |
スコア | 2,742,786 |
平均クエリ数 | 7650.00 |
最終ジャッジ日時 | 2021-11-30 23:52:25 |
合計ジャッジ時間 | 21,829 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
純コード判定しない問題か言語 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 100 |
ソースコード
#include<bits/stdc++.h>using namespace std;int main(){int T,R;cin >> T >> R;int p=0,nxt=4;for(int i=0;i<T;i++){int n;cin >> n;for(int j=0;j<n;j++){int dum;cin >> dum;}p+=n;vector<pair<int,int>> vp;while(nxt<=p){vp.push_back({nxt-3,nxt-2});vp.push_back({nxt-2,nxt-1});vp.push_back({nxt-1,nxt});nxt+=4;}cout << vp.size() << '\n';for(auto &nx : vp){cout << nx.first << ' ' << nx.second << '\n';}fflush(stdout);}return 0;}