A. Dice Rolling 签到. #include <bits/stdc++.h> using namespace std; int t, n; int main() { scanf("%d", &t); while (t--) { scanf("%d", &n); ) puts("); else { ; res += n / ; printf(); } } ; } B. Letters Rearranging 签到. #
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000作者博客:http://www.cnblogs.com/ljh2000-jump/转载请注明出处,侵权必究,保留最终解释权! Description 墨墨购买了一套N支彩色画笔(其中有些颜色可能相同),摆成一排,你需要回答墨墨的提问.墨墨会像你发布如下指令: 1. Q L R代表询问你从第L支画笔到第R支画笔中共有几种不同颜色的画笔. 2. R P Col 把第P支画笔替换为颜色C
今天终于拿到官方数据,兴致勃勃地全 A 了. Day 1 T1 toy 处理一下正负号加加减减取模乱搞就好了. #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <algorithm> using namespace std; int read() { int x = 0, f =
import java.util.*; public class Main{ static int MAX_VERTEXNUM = 100; static int [] visited = new int[MAX_VERTEXNUM]; public static void main(String [] args){ Graph G = new Graph(); creatGraph(G); output(G); for(int i=0;i<G.vertex_num;i++) visited[i
1. [BZOJ]1941: [Sdoi2010]Hide and Seek 题目大意:给出n个二维平面上的点,一个点的权值是它到其他点的最长距离减最短距离,距离为曼哈顿距离,求最小权值.(n<=500,000) 思路:k-d tree裸题. #include<cstdio> #include<algorithm> using namespace std; inline int read() { int x;char c; '); )+(x<<)+c-'; ret