結果

問題 No.709 優勝可能性
ユーザー kotatsugamekotatsugame
提出日時 2018-06-29 22:36:01
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 474 bytes
コンパイル時間 696 ms
コンパイル使用メモリ 79,760 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-13 15:24:08
合計ジャッジ時間 6,427 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
8,760 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:10:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
   10 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<set>
#include<vector>
using namespace std;
int n,m;
int R[11];
vector<int>a[11];
int MR[11];
main()
{
	cin>>n>>m;
	for(int i=0;i<n;i++)
	{
		set<int>now;
		for(int j=0;j<m;j++)
		{
			cin>>R[j];
			if(MR[j]<R[j])
			{
				MR[j]=R[j];
				a[j].clear();
				a[j].push_back(i);
			}
			else if(MR[j]==R[j])
			{
				a[j].push_back(i);
			}
			for(int k=0;k<a[j].size();k++)now.insert(a[j][k]);
		}
		cout<<now.size()<<endl;
	}
}
0