結果

問題 No.1130 Grid Numbers
ユーザー mfbgjsczmfbgjscz
提出日時 2020-07-19 03:10:38
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 518 bytes
コンパイル時間 2,187 ms
コンパイル使用メモリ 204,744 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-08 22:08:12
合計ジャッジ時間 2,822 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
5,376 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
5,376 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define rep(i,m,n) for(lli i = m;i < n;i++)
#define Sort(n) sort(n.begin(), n.end())
#define Out(S) cout << S << endl
#define Vec(K,L,N,S) vector<L> K(N,S)
int main(){
  lli A,B,C,D,E,L,R,X,Y,W,H,N,M,K,sum=0,num=0,flag=0;string S,T;
  cin >> N >> M;
  Vec(P,int,N*M,0);
  rep(i,0,N*M)cin >> P[i];
  Sort(P);
  rep(i,0,N*M){
    if(sum==M-1){
      cout << P[i] << endl;
      sum=0;
    }else{
      cout << P[i] << endl;
      sum++;
    }
  }
}
0