【AIM Tech Round 5 (rated, Div. 1 + Div. 2) 總結】【題解往前或往後翻,不在這】
又是爆炸的一場
心態有點小崩。但問題不大。。
看A題,一直擔心有多個正方形。。小心翼翼地看完之後,毅然地交上去了。
[00:08] A【Accpted】
然後開始看B題。
覺得和之前做的某題很像,但翻了翻發現那題是i-s(i)所以才有單調性.
然後繼續想啊想。突然想到a+b==10000的話豈不是美滋滋。
然後看了下位數的限制,很開心的交了兩行代碼上去.
[00:20] B 【Accpted】
然後開心地去看C。
發現這不就是一道離散化+set的題嗎?
對x離散化。然後對於x1..x2這一段。把v[x1].push_back({y1,y2})然後vv[x2].push_back({y1,y2});
然後for (int i =1 ;i <= 2*n;i++) 對於v[i].size()>0的,tot+=v[i].size();然後把v[i]對應的y1放在大根堆,y2放在小根堆
如果大根堆堆頂<=小根堆堆頂 且tot>=n-1
那不就ok了?輸出i對應的x以及大根堆到小根堆中任意一個值作為y..
想法很美好。。。
[00:40] C 【Pretest Pasted】
賽後C題WA了。。
為什麽這個思路錯了呢?主要在於tot==n的情況。這種情況,如果大根堆堆頂>小根堆堆頂。我們不能簡單地認為
沒解,因為我們可以將其中任意一個矩形刪掉的!還剩n-1個也滿足題意!我顯然漏算了這種情況。。
【AIM Tech Round 5 (rated, Div. 1 + Div. 2) 總結】【題解往前或往後翻,不在這】
相關推薦
【AIM Tech Round 5 (rated, Div. 1 + Div. 2) 總結】【題解往前或往後翻,不在這】
思路 set test ted alt 圖片 簡單 單調性 png 又是爆炸的一場 心態有點小崩。但問題不大。。 看A題,一直擔心有多個正方形。。小心翼翼地看完之後,毅然地交上去了。 [00:08] A【Accpted】 然後開始看B題。 覺得和之前做的某題很像,但翻了翻
【AIM Tech Round 5 (rated, Div. 1 + Div. 2) A】 Find Square
for ifdef push lld 位數 gin n) sin rep 【鏈接】 我是鏈接,點我呀:) 【題意】 在這裏輸入題意 【題解】 找到左上角。往下一直走,往右一直走走到B邊界就好。 中點的話。直接輸出中位數 【代碼】 #include <
AIM Tech Round 5 (rated, Div. 1 + Div. 2) D(SET,思維)
main per accept 範圍 %s nbsp 應該 位置 erb #include<bits/stdc++.h>using namespace std;const long long mod = 1e9+7;char s[370007][27];long
AIM Tech Round 5 1028cf(A-E)
很多 pre arr 註意 -m ref 可能 accept scan AIM Tech Round 5 (codeforces上題目編號是1028)(A-E) ---完全被這次比賽打擊,自己真的很渣--- 戰況 依舊3題選手 被構造題坑得好慘 稍稍漲了rating,希望
【貪心】【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) C. Fountains 【樹狀數組維護區間最大值】
name hat codes tle find lowbit ble amp cif 題目傳送門:http://codeforces.com/contest/799/problem/C C. Fountains time limit per test 2 seconds
【CodeForces】Lyft Level 5 Challenge 2018 - Elimination Round (Div. 1 + Div. 2) 題解
【比賽連結】 點選開啟連線 【題解連結】 點選開啟連結 **【A】**King Escape 【思路要點】 皇后會攻擊到
Codeforces Round #513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) D. Social Circles 【貪心】
D. Social Circles time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Y
AIM Tech Round 4 (Div. 1) C - Upgrading Tree 構造 + 樹的重心
sca def dfs clas 菊花 %d href 發現 enter C - Upgrading Tree 我發現我構造題好弱啊啊啊。 很明顯能想到先找到重心, 然後我們的目標就是把所有點接到重心的兒子上,讓重心的兒子子樹變成菊花圖, 這個先把重心到兒子的邊連到
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-
AIM Tech Round 4 (Div. 2) A B C
can out cnblogs 並查集 logs using scan 色相 所有 A. Diversity 題意:給出一個字符串,和n,問最多改變多少個字符,使其不同字符最少為n 1 #include<bits/stdc++.h> 2 using nam
【codeforces】【比賽題解】#868 CF Round #438 (Div.1+Div.2)
這一 一行 mes 無限 解鎖 col 道路 ces 然而 這次是Div.1+Div.2,所以有7題。 因為時間較早,而且正好趕上訓練,所以機房開黑做。 然而我們都只做了3題。:(。 鏈接。 【A】聲控解鎖 題意: Arkady的寵物狗Mu-mu有一只手機。它需要朝這個手機
【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) A】 Palindromic Supersequence
ont include define round sequence oca pac ble body 【鏈接】 我是鏈接,點我呀:) 【題意】 在這裏輸入題意 【題解】 字符串倒著加到原串右邊就好 【代碼】 #include <bits/std
【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[
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
E - Down or Right Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final)
its rcm base long long std ont return down fflush http://codeforces.com/contest/1023/problem/E 交互題 1 #include <cstdio> 2 #inc
Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) D. Array Restoration
ring amp val ons urn pos cup eof oid 從最大的數開始討論 如果最大的數中間有斷開的地方,那麽就需要從0裏面選,把他填上 需要使用樹狀數組 #include <iostream> #include <cstdio>
Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) E. Down or Right
ans 距離 bit ++i flush string 多條 codeforce names 從(1,1,n,n)每次只變一個坐標,進行詢問。 如果問到對角線有距離限制, 再從(1,1,n/2,n/2)詢問到(n/2,n/2,n,n) 記住前半部分貪心忘上走,後本部分貪心往