一名大三older 希望能帮助大一萌新...加油 xiandianer!!!!; xdoj 1260 (B) 水题 用了一下STL (好长啊...) #include<iostream> #include<cstdio> #include<algorithm> #include<map> using namespace std; ; struct T{ string suj; double p; bool operator <(const T&…
西安电子科技大学第16届程序设计竞赛网络同步赛 G-小国的复仇 2 链接:https://www.nowcoder.com/acm/contest/107/G来源:牛客网 题目描述 众所周知,汀老师是XDUACM实验室最优秀的人,无论是学习还是打游戏.今天他突然想到一个好玩的游戏.规则是这样的,在游戏中他要得到n个小国,初始的时候小国和小杰各有1个.经过了很久的修炼,汀老师学会了两种魔法,他每次可以动用自己的智慧来使用魔法. 第一个魔法:(小杰变小国)可以将自己的智慧复制和当前小杰一样数量的小国…
sb找规律. 分解因数. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair using namespace std; ; +; const int inf=0x3f3f3f3f; const LL INF=0x3f3f3f3f3f3f3f3f; ; int f[N]; bool prime[N]; void init() { memset(pr…
链接:https://www.nowcoder.com/acm/contest/107/E来源:牛客网 Xieldy And His Password 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 众所周知,Xieldy最常用的口令是******. 为了改变这一现状,他random了一个01串,并从中截取了一段作为自己的口令. 他选择的口令满足以下条件: 1. 口令串表示的二进制数在十…
链接:https://www.nowcoder.com/acm/contest/107/B来源:牛客网 Words Game 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 有一款英语练习游戏是这样的,每次会给出一些字母,然后需要你从中拼出一个最长的英文单词. 虽然williamchen的英语非常差,但是他现在搞到了一本英语词典,他只需要在词典里找出一个最长的符合条件的字母即可. 现在你…
链接:https://www.nowcoder.com/acm/contest/107/F来源:牛客网 Operating System 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 在学习Operating System的过程中,Glory遇到了这样一个问题,现在有一个大小为可以容纳N个页面的内存,硬盘内的内容被分成M个页面,用1~M来标识,一开始内存里没有任何页面,接下来用户会请求…
A.关电脑 #include<bits/stdc++.h> using namespace std; typedef long long LL; int T,h1,m1,s1,h2,m2,s2,t1,t2,ans; int main(){ while(cin>>T){ ;cas<=T;++cas){ cin>>h1>>m1>>s1>>h2>>m2>>s2; t1=h1*+m1*+s1,t2=h2*+m2*…
Problem 1603 - Minimum Sum Time Limit: 2000MS   Memory Limit: 65536KB   Total Submit: 564  Accepted: 157  Special Judge: No Description There are n numbers A[1] , A[2] .... A[n], you can select m numbers of it A[B[1]] , A[B[2]] ... A[B[m]]  ( 1 <= B[…
Minieye杯第十五届华中科技大学程序设计邀请赛现场同步赛 I Matrix Again https://ac.nowcoder.com/acm/contest/700/I 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 KK is the engineer responsible for sensor sensing in MINIEYE. KK recently need to u…
A. Vicious Keyboard time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Tonio has a keyboard with only two letters, "V" and "K". One day, he has typed out a string s with only t…