結果
問題 |
No.2680 研究室配属
|
ユーザー |
![]() |
提出日時 | 2024-04-03 09:15:29 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 515 bytes |
コンパイル時間 | 2,084 ms |
コンパイル使用メモリ | 191,600 KB |
最終ジャッジ日時 | 2025-02-20 19:48:24 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 23 |
ソースコード
#include<bits/stdc++.h> using namespace std; int N,M,A[1000],T[1000][1000],ans[1000]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin>>N>>M; for(int i=0;i<M;i++)cin>>A[i]; for(int i=0;i<N;i++) { ans[i]=-1; for(int j=0;j<M;j++)cin>>T[i][j]; } for(int j=0;j<M;j++)for(int i=0;i<N;i++) { if(ans[i]==-1&&A[T[i][j]]>0) { ans[i]=T[i][j]; A[T[i][j]]--; } } for(int i=0;i<N;i++)cout<<ans[i]<<endl; }