結果
問題 | No.2178 Payable Magic Items |
ユーザー |
|
提出日時 | 2025-03-24 16:38:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 885 bytes |
コンパイル時間 | 987 ms |
コンパイル使用メモリ | 74,952 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-24 16:38:52 |
合計ジャッジ時間 | 7,137 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 7 TLE * 1 -- * 15 |
ソースコード
#include <iostream>#include <vector>using namespace std;int main() {//freopen("test.txt","r",stdin);int N, K;cin >> N >> K;vector<vector<int>> S(N, vector<int>(K));for (int i = 0; i < N; i++) {string xx;cin>>xx;for (int j = 0; j < K; j++) {S[i][j]=xx[j];}}int count = 0;for (int x = 0; x < N; x++) {for (int y = 0; y < N; y++) {if (x == y) continue;bool dominated = true;for (int k = 0; k < K; k++) {if (S[x][k] > S[y][k]) {dominated = false;break;}}if (dominated) {count++;break;}}}cout << count << endl;return 0;}