原创 Chloe and the sequence
題目地址 題目大意:按照他的那個創造數組的方式,數第k個數是幾。 思路:看他給的數組例子,會發現奇數時都是1,當去處1時奇數又都是2了,以此類推。 #include <cstdio> #include <cstring> #inclu
原创 The Suspects 並查集練習
題目地址:https://vjudge.net/problem/POJ-1611 題目大意:最近SARS傳播, 學校裏爲了隔離可能被感染的人, 讓你找出個能被感染的人, 現規定, 在同一個社團中, 只要有
原创 Ubiquitous Religions 並查集入門
題目地址 題目描述:爲了算每個學校內有多少個宗教,對學生進行詢問,每兩個學生有相同的宗教信仰,現在要計算學校裏最多有多少不同的宗教。 第一行輸入學生人數n和詢問次數m,接下來m行,每行表示這兩個學生有着相同的信仰。00結束 思路:並查集
原创 I NEED A OFFER!
題目地址 思路:揹包的入門題 揹包講解 #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <cmath> #defin
原创 Snacktower 水題模擬
According to an old legeng, a long time ago Ankh-Morpork residents did something wrong to miss Fortune, and she curse
原创 A Serial Killer
題目地址 題目大意:殺手要殺人,最初的字符串是受害者名單,更新這些受害者名單,之後給出的每組兩個字符串, 第一個字符串是要殺掉的, 第二個是更新進去的 思路:水題,模擬一下就好 #include <algorithm> #includ
原创 Mister B and Book Reading
題目描述: Mister B once received a gift: it was a book about aliens, which he started read immediately. This book had c
原创 Karen and Morning
Karen is getting ready for a new school day! It is currently hh:mm, given in a 24-hour format. As you know, Karen lo
原创 Pupils Redistribution
題目描述: In Berland each high school student is characterized by academic performance — integer value between 1 and 5.
原创 Weird Rounding
Polycarp is crazy about round numbers. He especially likes the numbers divisible by10k. In the given number of n Poly
原创 I'm bored with life
題目描述: Holidays have finished. Thanks to the help of the hacker Leha, Noora managed to enter the university of her dr