摘要:
Problem Statement You are given a string S consisting of digits between 1 and 9, inclusive. You can insert the letter + into some of the positions (po 阅读全文
摘要:
Problem Statement "Teishi-zushi", a Japanese restaurant, is a plain restaurant with only one round counter. The outer circumference of the counter is 阅读全文
摘要:
Kuro is living in a country called Uberland, consisting of nn towns, numbered from 11to nn, and n−1n−1 bidirectional roads connecting these towns. It 阅读全文
摘要:
D - Handstand Time Limit: 2 sec / Memory Limit: 1024 MB Score : 400400 points Problem Statement NN people are arranged in a row from left to right. Yo 阅读全文
摘要:
链接:https://ac.nowcoder.com/acm/contest/560/D来源:牛客网 题目描述 Give you a rectangular gird which is h cells high and w cells wide. Each grid is black initial 阅读全文
摘要:
Let's suppose you have an array a, a stack s (initially empty) and an array b (also initially empty). You may perform the following operations until b 阅读全文
摘要:
D - We Like AGC Time Limit: 2 sec / Memory Limit: 1024 MB Score : 400400 points Problem Statement You are given an integer NN. Find the number of stri 阅读全文
摘要:
Bobo has a balanced parenthesis sequence P=p 1 p 2…p n of length n and q questions. The i-th question is whether P remains balanced after p ai and p b 阅读全文
摘要:
Bobo 有一个 n 个点,m 条边的有向无环图(即对于任意点 v,不存在从点 v 开始、点 v 结束的路径)。 为了方便,点用 1,2,…,n 编号。 设 count(x,y) 表示点 x 到点 y 不同的路径数量(规定 count(x,x)=0),Bobo 想知道 除以 (10 9+7) 的余数 阅读全文
摘要:
给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量: 1. 1≤a≤n,1≤b≤m; 2. a×b 是 2016 的倍数。 Input 输入包含不超过 30 组数据。 每组数据包含两个整数 n,m (1≤n,m≤10 9). Output对于每组数据,输出一个整数表示满足条件的数 阅读全文