随笔分类 - 思维
摘要:Sereja and Brackets 题目链接: "CodeForces 380C " Sereja has a bracket sequence s 1, s 2, ..., s n , or, in other words, a string s of length n , consistin
阅读全文
摘要:A. BowWow and the Timetable time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output In the city of Sa
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/634/B 来源:牛客网 题目描述 给出n条线段,第i条线段的长度为a_ia i ,每次可以从第i条线段的j位置跳到第i + 1条线段的j+1位置。如果第i+1条线段长度不到j+1,那么就会回到第i条线段的0位置,然后
阅读全文
摘要:C. Report time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Each month Blake gets the report c
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/993/E 来源:牛客网 对牛排序 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 Farmer John正在尝试将
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/993/D 来源:牛客网 迷路的牛 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 Farmer John的三头获奖
阅读全文
摘要:E. Connected Component on a Chessboard time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You a
阅读全文
摘要:D1. RGB Substring (easy version) time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output The only di
阅读全文
摘要:C. Multi Subject Competition time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output A multi subject
阅读全文
摘要:题目描述 小猫有一个 2\times N2×N 的棋盘,每一个格子放着一个黑棋子或白棋子。 小熊觉得小猫的棋盘不够好看,想要把棋盘上的一部分白棋子替换成黑棋子,使得所有黑棋子都能够在仅允许上下左右四个方向走,且仅经过黑棋子在的格子的情况下两两互相到达。 小熊想知道至少要将多少个白棋子替换成黑棋子。
阅读全文
摘要:Problem Statement There is an integer sequence A of length N. Find the number of the pairs of integers l and r (1≤l≤r≤N) that satisfy the following co
阅读全文
摘要:Problem Statement You are given two integer sequences, each of length N: a1,…,aN and b1,…,bN. There are N2 ways to choose two integers i and j such th
阅读全文
摘要:Acingel is a small town. There was only one doctor here — Miss Ada. She was very friendly and nobody has ever said something bad about her, so who cou
阅读全文
摘要:Time Limit: 2 sec / Memory Limit: 1024 MB Score : 700700 points Problem Statement You are given an integer NN. Build an undirected graph with NN verti
阅读全文
摘要:Time Limit: 2 sec / Memory Limit: 1024 MB Score : 400400 points Problem Statement Snuke has an empty sequence aa. He will perform NN operations on thi
阅读全文
摘要:Arkady and his friends love playing checkers on an n×nn×n field. The rows and the columns of the field are enumerated from 11 to nn. The friends have
阅读全文
摘要:There are nn players sitting at the card table. Each player has a favorite number. The favorite number of the jj-th player is fjfj. There are k⋅nk⋅n c
阅读全文
摘要:Problem Statement AtCoDeer the deer is seeing a quick report of election results on TV. Two candidates are standing for the election: Takahashi and Ao
阅读全文
摘要:Problem Statement We have a grid with H rows and W columns. At first, all cells were painted white. Snuke painted N of these cells. The i-th ( 1≤i≤N )
阅读全文
摘要:Problem Statement "Teishi-zushi", a Japanese restaurant, is a plain restaurant with only one round counter. The outer circumference of the counter is
阅读全文

浙公网安备 33010602011771号