ICode9

精准搜索请尝试: 精确搜索
  • 计蒜客 T1167 素数回文数的个数2021-04-04 11:32:09

    水题~。 int n; bool isprime(int x) { if(x<2) return false; for(int i=2;i*i<=x;i++) if(x % i == 0) return false; return true; } bool palindrome(int x) { int res=0,t=x; while(t) { res=res*10+t%10;

  • CCF 202012-1 期末预测之安全指数 (水题)2021-03-17 23:30:57

    传送门 思路:啊这,可不就是水题嘛,不过java菜狗连输入输出都要搜索┭┮﹏┭┮。 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); in

  • POJ 31862021-03-08 13:01:43

    水题,思路很简单,不过这里有一个另一思路,也蛮有启发性的(关于状态定义) #include <iostream> #include <algorithm> #include <string> #include <vector> #include <cstdio> #include <cstring> using namespace std; const int maxn = 2005; int v[maxn]; int dp[ma

  • 1120 Friend Numbers (20 分)2021-02-22 11:36:16

    set水题~。 set<int> S; int n; int main() { cin>>n; for(int i=0;i<n;i++) { string s; cin>>s; int sum=0; for(int i=0;i<s.size();i++) sum+=(s[i]-'0'); S.insert(s

  • 八月水题总结2021-02-15 22:01:15

    这里放一些8月做过的题目。 洛谷 题目 难度 PS 题解 P2483 【模板】k短路 / [SDOI2010]魔法猪学院 \(\color{black}黑\) PS:A*+特判一个点酒过了, Link P2512 [HAOI2008]糖果传递 \(\color{blue}蓝\) 环形的均分纸牌 P2879 [USACO07JAN]Tallest Cow S \(\color{green}绿

  • 寒假每日一题题解(2.14)数字反转(水题!!!)2021-02-13 21:33:44

    数字反转(水题!!!) 给定一个整数,请将该数各个位上数字反转得到一个新数。 新数也应满足整数的常见形式,即除非给定的原数为零,否则反转后得到的新数的最高位数字不应为零。 输入格式 输入共1行,1个整数N。 输出格式 输出共1行,1个整数表示反转后的新数。 数据范围 |N|≤109 输入样例

  • POJ 2366 Who‘s in the Middle2021-01-25 09:05:22

    题目描述 水题,排序输出中点即可 #include<algorithm> #include<iostream> using namespace std; int arr[10005]; int main(){ int n; cin>>n; for(int i=0;i<n;i++) cin>>arr[i]; sort(arr,arr+n); cout<<arr[n/2]<<endl; }

  • [PAT A1008]Elevator(水题、数学问题)2021-01-24 12:01:40

    1008 Elevator Input Specification:Output Specification:Sample Input:Sample Output:Analysis:Code: The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator

  • A. Vanya and Cubes(水题)2021-01-08 21:03:08

    题意:给Vanya  n个方块,用来堆塔,塔的第i层有1+2+3+......+i个,问给出的方块最多能堆几层,输出层数。 题解:时间没有限制,所以用简单的for循环求和就可以解决。主要是bug改了几次。。。 ACcode:   int main() { int n; cin >> n; int sum = 0, hei = 0, total = 0; for (int i = 1;

  • B. A and B and Compilation Errors(水题)2021-01-08 19:36:13

    题意:输入n个数(第一排输入n),组成一个数组ai(第二排输入数组)。第三排输入的数组比第二排少一个数(消失的数是第二排存在的),第四排的数组又比第三排的数组少一个数(消失的数是第三排数组存在的数)。输出每次消失的那个数。 题解:这道题没有过分的时间限制,所以就直接排序,比较。当两个元素不

  • A. Boring Apartments(水题)2020-12-17 23:02:10

    题意:题目设定在1到10000之内,有一些数被成为无聊的数(如果这个数字中存在相同数字,包括只有一个数字的数,如1,2,3)。输入一个n,求从1到n这个范围内,无聊的数的数字个数的总和。(注意!是数字的个数(1111是4个数字)!!!!) 题解:范围是到10000,所以最多有四位数,所以一个数字(1,11,111,1111)的数字总和就是(1+2+3+

  • Codeforces Round #676 (Div. 2)A. XORwice,水题2020-12-14 16:05:50

    problem A. XORwice time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output In order to celebrate Twice’s 5th anniversary, Tzuyu and Sana decided to play a game. Tzuyu gave Sana two integers a and b and a

  • NOIP膜你赛322020-11-11 18:02:45

    T1 循环依赖 水题,连边判环,dfs或者拓扑都可 T2 A n2暴力,实际上直接对于每个x跑的话能拿40,但是需要卡常 我们发现柿子里并没有常数项,于是可以想到两边都除掉一个x 变成了\(ax+b\)的形式,就很可做了,用单调栈维护凸包就行 T3 B 全是1的情况:每种情况的概率都是\(\frac{1}{n}\),答案就是

  • CSP2020游记2020-11-07 13:32:51

    \(Day -\infty\) 初赛 上午S初赛,懵。 中午看了两集纪录片。 下午J初赛,做完卷子开始思考def一个坑同学的题。 考完交流: 我:线性跑积性函数可以。 def:单 \(\log\) 跑一般函数可以。 好了两题有了( \(Day -1\) 打了场模拟赛,一套水题没都想出来,菜。 考前模拟赛一直爆炸怎么办啊qwq \(Day

  • 水题挑战4: luogu P1280 尼克的任务2020-11-04 18:01:42

    题目描述 尼克每天上班之前都连接上英特网,接收他的上司发来的邮件,这些邮件包含了尼克主管的部门当天要完成的全部任务,每个任务由一个开始时刻与一个持续时间构成。 尼克的一个工作日为 \(n\) 分钟,从第 \(1\) 分钟开始到第 \(n\) 分钟结束。当尼克到达单位后他就开始干活,公司一共有

  • 8.10总结2020-08-11 06:31:29

    今天算是考了两次试吧。上午的水题大战,T1给T了,T2WA了,T3把35分的基础暴力分打满了,T4的话我一直认为我的就算A不掉,至少能拿50以上吧,结果直接爆0了,卡精度太EX了,还要const 一个 eps 。 晚上的“火题小战”更EX,只能打打暴力,打个表来那点分。一晚上一道题也没做出来,甚至连思路都没有……

  • 牛客算法周周练11水题2020-06-17 18:04:20

    Powered by:AB_IN 局外人 第一次练习赛AK。 A 切题之路 纯模拟,没什么好说的。 #include <bits/stdc++.h> #pragma GCC optimize(2) #pragma GCC optimize(3) typedef unsigned long long ll; const ll maxn=1e6; using namespace std; namespace IO{ char ibuf[1<<21],*

  • UVA 10935 Throwing cards away2020-06-04 19:57:50

    水题 #include<bits/stdc++.h> int main(void) { int n; while(cin>>n && n!=0) { queue<int> q; printf("Discarded cards:"); for(int i=1;i<=n;i++)q.push(i); while(q.size()

  • 中考后计划2020-05-31 09:54:12

    距离中考只剩50天了,为了防止自己再咕咕咕,提前做好计划。 七月 整理早期的题解,特别是早期GHOJ上的大量水题题解,可以全部删掉,只留下一篇一句话题解留给后人。 把没写的题解补完。 刷些水题恢复手感,把早期在GHOJ的天坑填了,还有之前在Luogu做的题单和USACO也填了。 八月

  • Codeforces Round #638 A.Phoenix and Balance(水题)2020-05-02 14:51:16

    Phoenix has nn coins with weights 21,22,…,2n21,22,…,2n. He knows that nn is even. He wants to split the coins into two piles such that each pile has exactly n2n2 coins and the difference of weights between the two piles is minimized. Formally, let aa deno

  • Turing Tape CodeForces - 133C 【模拟 水题 输入】2020-04-29 16:07:51

    题意 给你一串字符串,包含1~105个字符。按照规则输出数字。 The 8-bit binary notation of the ASCII-code of the previous printed character is reversed. When the first element of the array is processed, the result of this step is considered to be 0. 将ASCII码反转

  • UCF-PLC-20180825 A Fold the Paper Nicely 签到题2020-04-05 12:02:18

       水题 #include<bits/stdc++.h> using namespace std; int a, b, k; int main(){ cin >> a >> b >> k; while(k--) if(a>b) a /= 2; else b /= 2; cout << max(a,b) << " " << min(a,

  • P1029 最大公约数和最小公倍数问题(数论水题)2020-03-05 19:03:21

    题目描述 输入两个正整数 x0,y0x_0, y_0x0​,y0​,求出满足下列条件的 P,QP, QP,Q 的个数: P,QP,QP,Q 是正整数。 要求 P,QP, QP,Q 以 x0x_0x0​ 为最大公约数,以 y0y_0y0​ 为最小公倍数。 试求:满足条件的所有可能的 P,QP, QP,Q 的个数。 输入格式 一行两个正整数 x0,y0x_0

  • (每日水题005-1)(细节处理)洛谷P1014 Cantor表2020-03-02 19:44:36

    一、算法分析 可以把cantor表按照从左上到右下进行分层,然后分析出本题的答案与“层数”有关,只要求得层数和该数位于该层的第几个即可。层数的计算可以根据1~n累加等于(1+n)*n/2,然后列一元二次方程计算。 二、代码及注释 #include<iostream> #include<cstring> #include<algo

  • C++-蓝桥杯-排它平方数[2013][枚举][水题]2020-03-02 16:55:33

        1 #include <bits/stdc++.h> 2 using namespace std; 3 bool vis[15]; 4 bool check(long long a,long long b){ 5 memset(vis,0,sizeof(vis)); 6 while(a) 7 if(!vis[a%10])vis[a%10]=1,a/=10; 8 else return false; 9 whil

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有