Codeforces Round #502 Div. 1 + Div. 2 A. The Rank
題意:每個人有4門學科,給出n個人的分數,小明的分數是第一個給出的,問小明的總分排名第幾
思路:水題,求和排序即可。
#include<cstdio> #include<iostream> #include<string> #include<cstring> #include<cmath> #include<algorithm> using namespace std; int main() { int n, a, b, c, d, sum, p, ct = 0; int i; scanf("%d", &n); scanf("%d%d%d%d", &a, &b, &c, &d); p = a + b + c + d; for (i = 2; i <= n; i++) { scanf("%d%d%d%d", &a, &b, &c, &d); sum = a + b + c + d; if (sum > p) { ct++; } } printf("%d\n", ct + 1); return 0; }
相關推薦
Codeforces Round #502 Div. 1 + Div. 2 A. The Rank
題意:每個人有4門學科,給出n個人的分數,小明的分數是第一個給出的,問小明的總分排名第幾 思路:水題,求和排序即可。 #include<cstdio> #include<iostream> #include<string> #inc
ICM Technex 2017 and Codeforces Round #400 (Div. 1 + Div. 2, combined) A
his art ros sta roc initial ins serial style Our beloved detective, Sherlock is currently trying to catch a serial killer who kills a pe
【ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined) A】 Palindromic Supersequence
ont include define round sequence oca pac ble body 【鏈接】 我是鏈接,點我呀:) 【題意】 在這裏輸入題意 【題解】 字符串倒著加到原串右邊就好 【代碼】 #include <bits/std
Codeforces Round #502 ( Div. 1 + Div. 2)
A.The Rank 手速題,給你一堆人的成績,問你其中第一個人的總分排第幾(總分相同按出現順序排)。 那儲存第一個人的成績,先放在第一名,然後後面每有一個成績比他高的,排名就加一。最後複雜度是O(n)。 我手賤,打了個結構體,大家就當沒看見。 struct stu {
Codeforces Round #513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2).A. Phone Numbers
A. Phone Numbers time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Le
【貪心】【multiset】Tinkoff Challenge - Final Round (Codeforces Round #414, rated, Div. 1 + Div. 2) C. Naming Company
nal head 1+n final ase algorithm erase 集合 clu 考慮兩個人,先把各自的集合排個序,丟掉一半,因為比較劣的那一半一定用不到。 然後貪心地放,只有兩種決策,要麽把一個最優的放在開頭,要麽把一個最劣的放在結尾。 如果我的最優的比對方所有
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2)B. T-shirt buying
character break empty not integer contain strong accept space 傳送門 Description A new pack of n t-shirts came to a shop. Each of the t-
ICM Technex 2017 and Codeforces Round #400 (Div. 1 + Div. 2, combined) D
see otherwise tex 並查集 examples tree per sta with Moriarty has trapped n people in n distinct rooms in a hotel. Some rooms are locked, ot
Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) C
have ack ger mod state 9.png sample typedef itl It‘s that time of the year, Felicity is around the corner and you can see people celebr
Codeforces Round #438(Div.1+Div.2)總結
splay || div sans har .com eve pre 希望 本來興致勃勃的想乘著這一次上紫,於是很早很早的到了機房 但是好像並沒有什麽用,反而rating-=47 Codeforces Round #438(Div.1+Div.2) 今天就這樣匆匆的總
【codeforces】【比賽題解】#868 CF Round #438 (Div.1+Div.2)
這一 一行 mes 無限 解鎖 col 道路 ces 然而 這次是Div.1+Div.2,所以有7題。 因為時間較早,而且正好趕上訓練,所以機房開黑做。 然而我們都只做了3題。:(。 鏈接。 【A】聲控解鎖 題意: Arkady的寵物狗Mu-mu有一只手機。它需要朝這個手機
【做題】Codeforces Round #453 (Div. 1) D. Weighting a Tree——拆環
每一個 int 會有 while sig 實現 dex -s 怎麽辦 前言:結論題似乎是我的硬傷…… 題意是給你一個無向圖,已知連接到每一個點的邊的權值和(為整數,且屬於區間[-n,n]),需要求出每條邊權值的一個合法解(都要是在區間[-2*n^2,2*n^2]內的整數)。
Educational Codeforces Round 37 (Rated for Div. 2)A,B,C,F
fine 暴力模擬 需要 lose sort codeforce 結構 分享圖片 線段樹 A Water The Garden 數據不大,暴力模擬下直至把每個花床都遍歷過的過程即可 1 #include <bits/stdc++.h> 2 us
【Codeforces Round #462 (Div. 1) B】A Determined Cleanup
n) ont back include col line font ret 一個 【鏈接】 我是鏈接,點我呀:) 【題意】 在這裏輸入題意 【題解】 設\(設f(x)=a_d*x^{d}+a_{d-1}*x^{d-1}+...+a_1*x+a_0\) 用它去
【ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined) C】 Permutation Cycle
ech lac oid 位置 spa void emp blog post 【鏈接】 我是鏈接,點我呀:) 【題意】 在這裏輸入題意 【題解】 p[i] = p[p[i]]一直進行下去 在1..n的排列下肯定會回到原位置的。 即最後會形成若幹個環。 g[i]
【ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined) B】Recursive Queries
題解 fine com ces ble dfs con round cal 【鏈接】 我是鏈接,點我呀:) 【題意】 在這裏輸入題意 【題解】 寫個記憶化搜索。 接近O(n)的復雜度吧 【代碼】 #include <bits/stdc++.h>
【ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined) D】Tree
.... con out contest and urn -- ifdef cnblogs 【鏈接】 我是鏈接,點我呀:) 【題意】 讓你在樹上找一個序列。 這個序列中a[1]=R 然後a[2],a[3]..a[d]它們滿足a[2]是a[1]的祖先,a[3]是a[
ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined)
idt force 分享 for post mage img info combine 占坑,明天寫,想把D補出來一起寫。 ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined)
Codeforces Round #505 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) -B C(GCD,最長連續交替序列)
all clas 拼接 true 序列 -s light scan inf B. Weakened Common Divisor time limit per test 1.5 seconds memory limit per test 256 mega
Codeforces Round #505 (Div 1 + Div 2 Combined) Partial Solution
style tro weak 必要條件 scan any none mas 做出 從這裏開始 題目列表 瞎扯 Problem A Doggo Recoloring Problem B Weakened Common Divisor Problem C