C Optimal Strategy

题目链接Ena and Mizuki are playing a game.There are n items in front of them, numbered from 1 to n. The value of the i-th item is ai. Ena and Mizuki take turns to move, while Ena moves first. In a move, t

- 阅读全文 -

K Search For Mafuyu

题目链接Mafuyu has hidden in Sekai, and Kanade is searching for her.In Sekai, there is nothing but a lot of rooms. There are n rooms in Sekai, numbered from 1 to n. Besides, n−1 pairs of rooms are directl

- 阅读全文 -

CCPC2019 Harbin

E#include<iostream> #include<cstdio> #include<vector> using namespace std; typedef long long ll; const int N = 1e6+10; int v[N]; int chos[N][3]; ll len[N]; vector<int> a[N]; in

- 阅读全文 -

Calculation HDU - 2837 欧拉降幂

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2837Assume that f(0) = 1 and 0^0=1. f(n) = (n%10)^f(n/10) for all n bigger than zero. Please calculate f(n)%m. (2 ≤ n , m ≤ 10^9, x^y means the y th powe

- 阅读全文 -

A.Artwork Codeforces-Gym102346

题目链接:https://codeforces.com/gym/102346题目大意:一个大小为 m x n 的房间, 有个小偷在(0,0)处,在(m,n)处有一幅画,房间里有 k 个传感器,探测半径为S , 问小偷能否在不被传感器探测到的情况下偷走画,能输出S, 不能输出N.思路小偷不能到达(m,n) 的情况有4种,就是看所有能相接的圆形成的连通块能否形成下面的形式:从靠左边(x<=r)

- 阅读全文 -