結果
問題 | No.1406 Test |
ユーザー |
![]() |
提出日時 | 2022-05-07 17:45:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,466 bytes |
コンパイル時間 | 690 ms |
コンパイル使用メモリ | 94,400 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 23:05:33 |
合計ジャッジ時間 | 1,458 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
//// 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}