結果

問題 No.1406 Test
ユーザー ramia777ramia777
提出日時 2022-05-07 17:45:22
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,466 bytes
コンパイル時間 835 ms
コンパイル使用メモリ 94,584 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-21 04:29:48
合計ジャッジ時間 2,144 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//
// Yukicoder
// No.1406

//#include "stdafx.h"
#include <stdio.h>
#include <iostream>
#include <vector>
#include <list>//list
#include <set> //tree
#include <map> //連想配列
#include <unordered_set> //hash
#include <unordered_map> //hash
#include <algorithm>
#include <iomanip>
#include <string>
#include <stdlib.h>


using namespace std;
typedef unsigned long long ULL;
typedef signed long long SLL;
typedef unsigned int UINT;


#define START (0)
#define RIGHT (1)
#define UP    (2)
#define LEFT  (3)
#define DOWN  (4)

#define DATA_MAX (1000000)
#define FMAX(a,b)  ((a)>(b)?(a):(b))
#define FMIN(a,b)  ((a)<(b)?(a):(b))

//vectorは便利だが処理時間がかかるので注意
vector <vector <SLL>> memo2;//二次元可変配列
vector<SLL> memo1;


SLL H ,A, B, T, F, N, M, Result;


SLL a[15];
SLL dp[5005][5005];

struct BOX {
	SLL w;
	SLL v;
};

BOX box[5005];


//美しさの降順にソート
int compare(const BOX * a, const BOX *b)
{
	if (a->v < b->v)
		return (1);
	else if (a->v > b->v)
		return (-1);
	return (0);
}



int main(int argc, char *argv[])
{
	SLL sum = 0,ans=0;

	
	// 入力部
	cin >> N;


	for (int i = 0; i < N-1; i++)
	{
		cin >> a[i];
		sum += a[i];
	}

	for (int i = 0; i <= 100; i++)
	{
		if (((sum + i) % N) == 0)
			ans++;
	}

	//Sorting
	//qsort(&box[0], N, sizeof(BOX), (int(*)(const void*,const void*))compare);


     
	
	cout << ans << endl;

	///////////////////
	//cout << endl;
	//getchar();

	return 0; //end
}
0