Cat Snuke and a Voyage --AtCoder】的更多相关文章

题目描述 In Takahashi Kingdom, there is an archipelago of N islands, called Takahashi Islands. For convenience, we will call them Island 1, Island 2, ..., Island N.There are M kinds of regular boat services between these islands. Each service connects tw…
C - Cat Snuke and a Voyage Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement In Takahashi Kingdom, there is an archipelago of N islands, called Takahashi Islands. For convenience, we will call them Island 1, Island 2, ...,…
A - ABCxxx Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement This contest, AtCoder Beginner Contest, is abbreviated as ABC. When we refer to a specific round of ABC, a three-digit number is appended after ABC. For example,…
A - ABCxxx 题意: 给出n,输出“ABCn”就可以了,纯水题. B - Break Number 题意: 给出n,找出从1到n的闭区间内能够被2整除最多次的数. 思路: 直接模拟. 代码: #include <stdio.h> #include <string.h> int main() { int n; scanf("%d",&n); ; ; ;i <= n;i++) { int tmp = i; ; == ) { tmp /= ; c…
ARC079题解 C - Cat Snuke and a Voyage #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define pdi pair<db,int> #define mp make_pair #define pb push_back #define enter putchar('\n') #define space putcha…
Problem Statement      Wolf Sothe and Cat Snuke are playing a card game. The game is played with exactly 100 cards. The cards are numbered from 1 to 100. The game is played as follows: First, Cat Snuke chooses the goal: an integer N between 1 and 100…
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 ) cell he painted is the cell at the ai-th row and bi-th column. Compute the following: For each inte…
题目描述 Fennec and Snuke are playing a board game.On the board, there are N cells numbered 1 through N, and N−1 roads, each connecting two cells. Cell ai is adjacent to Cell bi through the i-th road. Every cell can be reached from every other cell by re…
题目传送门:https://arc068.contest.atcoder.jp/tasks/arc068_c 题目翻译 直线上有\(0-m\)这\(m+1\)个点,一共有\(m\)辆火车.第\(i\)辆火车只会在\(i\)的倍数点上停靠,所有车都从\(0\)号点出发. 一共有\(n\)个商品,第\(i\)个商品只会在\(l_i-r_i\)号点出售,问你对于每辆火车,在可以停靠的站里,可以买到的商品种类数. \(m\leqslant 10^5,n\leqslant 3*10^5\). 题解 对于长…
D - Fennec VS. Snuke Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement Fennec and Snuke are playing a board game. On the board, there are N cells numbered 1 through N, and N−1 roads, each connecting two cells. Cell ai is a…