Skip to content

Commit 380fb92

Browse files
committed
Merge remote-tracking branch 'origin/imulan/battle_royal' into shinya/battle_royal
2 parents 533da4f + aaf35cd commit 380fb92

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

battle_royal/cpp-ryoissy/SOLUTION

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8; mode: python -*-
2+
3+
## Solution
4+
#c_solution(src='main.c') # -lm -O2 as default
5+
cxx_solution(src='ryoissy-battleroyal.cpp', flags=[]) # -std=c++11 -O2 as default
6+
#java_solution(src='Main.java', encoding='UTF-8', mainclass='Main')
7+
#java_solution(src='Main.java', encoding='UTF-8', mainclass='Main',
8+
# challenge_cases=[])
9+
#java_solution(src='Main.java', encoding='UTF-8', mainclass='Main',
10+
# challenge_cases=['10_corner*.in'])
11+
#script_solution(src='main.sh') # shebang line is required
12+
#script_solution(src='main.pl') # shebang line is required
13+
#script_solution(src='main.py') # shebang line is required
14+
#script_solution(src='main.rb') # shebang line is required
15+
#js_solution(src='main.js') # javascript (nodejs)
16+
#hs_solution(src='main.hs') # haskell (stack + ghc)
17+
#cs_solution(src='main.cs') # C# (mono)
18+
19+
## Score
20+
#expected_score(100)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include <bits/stdc++.h>
2+
#define MOD 1000000007LL
3+
using namespace std;
4+
typedef long long ll;
5+
typedef pair<int,int> P;
6+
7+
void solve(){
8+
int cnt=0;
9+
for(int i=0;i<100;i++){
10+
int a;
11+
scanf("%d",&a);
12+
cnt+=a;
13+
}
14+
printf("%d\n",100-cnt);
15+
}
16+
17+
int main(void){
18+
int t;
19+
scanf("%d",&t);
20+
for(int i=0;i<t;i++){
21+
solve();
22+
}
23+
return 0;
24+
}

0 commit comments

Comments
 (0)