时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 IG won the S championship and many people are excited, ii and gg are no exception. After watching the game, the two of them also want to play a game. There is now an infin…
链接:https://ac.nowcoder.com/acm/contest/338/I 来源:牛客网 题目描述 IG won the S championship and many people are excited, ii and gg are no exception. After watching the game, the two of them also want to play a game. There is now an infinite chessboard with on…
UVa10025 ? 1 ? 2 ? ... ? n = k problem The problem Given the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k? 1 ? 2 ? ... ? n = k For example: to obtain k = 12 , the expression to be used will be:…
Description Colossal! — exclaimed Hawk-nose. — A programmer! That's exactly what we are looking for. Arkadi and Boris Strugatsky. Monday starts on Saturday Reading the book "Equations of Mathematical Magic" Roman Oira-Oira and Cristobal Junta fo…
Little Sub is about to take a math exam at school. As he is very confident, he believes there is no need for a review. Little Sub's father, Mr.Potato, is nervous about Little Sub's attitude, so he gives Little Sub a task to do. To his surprise, Littl…
Sequence in the Pocket 题目链接(点击) DreamGrid has just found an integer sequence in his right pocket. As DreamGrid is bored, he decides to play with the sequence. He can perform the following operation any number of times (including zero time): select a…
A - Accurately Say "CocaCola"! In a party held by CocaCola company, several students stand in a circle and play a game. One of them is selected as the first, and should say the number 1. Then they continue to count number from 1 one by one (cloc…
using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.…
这场比赛我及时的参加了,但是打的时候状态实在是太烂了,只做出来了Div2的AB题. A Little C loves 3 I 直接构造就行. B Cover Points 应该很容易就看出来这个等腰三角形的腰是坐标轴,然后就用\(y=b-x\)的一次函数往上套就行了. C Enlarge GCD 这个题比赛的时候我交了4次,没有一次想到要先除gcd的.实际上在赛场上我已经接近正解了,就是枚举素因子,然后把最多的那个留着,其他的删掉就好了啊. 好吧,说起来简单,真正要把代码写到AC还是要看std的…
- Eddy's research II Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description As is known, Ackermann function plays an important role in the sphere of theoretical computer science. However, in the other h…
题目链接:https://vjudge.net/problem/LightOJ-1245 1245 - Harmonic Number (II) PDF (English) Statistics Forum Time Limit: 3 second(s) Memory Limit: 32 MB I was trying to solve problem '1234 - Harmonic Number', I wrote the following code long long H( int…
春训团队赛第四场 ID A B C D E F G H I J K L M AC O O O O O O O O O 补题 ? ? O O 传送门 题目链接(CF Gym102021) 题解链接(pdf) 代码 & 简易题解 [A]:LCA 给定一个格状迷宫,保证任意点均可达,且任意两格点间有且仅有一条简单路径. 给定一组移动序列,求按照这个序列走的累计路程. 按照题意对图预处理,得到一棵树,对于每对询问求 \(\text{LCA}\) 的同时求距离,累加即为答案. 一开始 \(\text{RE…