ICode9

精准搜索请尝试: 精确搜索
  • poj 2017(水题)2021-07-30 21:34:34

    #include<iostream> #include<cstdio> using namespace std; int main(){ int n,sum,s[15],t[15]; while(scanf("%d",&n)&&n!=-1){ for(int i=1;i<=n;i++){ scanf("%d%d",&s[i],&t[i]);

  • poj 2027(水题)2021-07-30 21:32:06

    #include<iostream> #include<cstdio> using namespace std; int main(){ int n,x,y; scanf("%d",&n); while(n--){ scanf("%d%d",&x,&y); if(x>=y)printf("MMM BRAINS\n");

  • poj 2000(水题)2021-07-30 21:00:59

    #include<iostream> #include<cstdio> using namespace std; int main(){ int n,sum,i,j,t; while(scanf("%d",&n)&&n){ i=1; while(i*(i+1)/2<n)i++; i--; sum = 0; for(j=1;j<=i;

  • poj 1969(容易失误,注意顺序,但是不难,是水题)2021-07-30 20:32:49

    #include<iostream> #include<cstdio> using namespace std; int main(){ int n; while(scanf("%d",&n)==1){ int k = 1; while(k*(k+1)/2<n)k++; k--; int t = n-k*(k+1)/2; k++; if(

  • poj 1936(水题)2021-07-30 20:03:29

    #include<iostream> #include<cstdio> #include<cstring> using namespace std; char s[100005],t[100005]; int main(){ while(scanf("%s%s",s,t)==2){ int i,j,lens = strlen(s),lent = strlen(t); for(i=0,j=0;i<lens&

  • poj 1665(水题,简单计算)2021-07-30 01:00:07

    #include<iostream> #include<cstdio> using namespace std; #define PI 3.1415927 int main(){ double d,r,t,ansl,ansspd; int kase = 1; while(scanf("%lf%lf%lf",&d,&r,&t)==3&&r!=0){ ansl = PI*d*r/12/5

  • poj 1528(水题)2021-07-29 20:04:38

    #include<iostream> #include<cstdio> /* PERFECTION OUTPUT 15 DEFICIENT 28 PERFECT 6 PERFECT 56 ABUNDANT 60000 ABUNDANT 22 DEFICIENT 496 PERFECT END OF OUTPUT */ using namespace std; int main(){ int i,j,k,a[105],s[1

  • poj 1326(水题)2021-07-29 14:04:05

    #include<iostream> #include<cstring> #include<cstdio> using namespace std; int main(){ char a[100],b[100],f[2],tmp[100]; int m,sum; sum = 0; while(true){ scanf("%s",tmp); if(!strcmp(tmp,"#&q

  • 暑期集训第二期第一天总结2021-07-28 23:35:12

            呀~不知不觉都已经到集训的第二期了呢,感觉两天假期过得好快啊(悲)。         今天主要是在刷学长给的搜索题(共有19道),今天总共刷了7道题,加上之前做的两道,这个搜索题场也能说刷了过半了吧,今天主要挑的都是一些简单的水题,感觉没什么营养,剩下的题对我来说都是有一定

  • 暑期水题乱做2021-07-27 11:33:05

    P1168 中位数 记录当前中位数,维护一个大根堆存储小于中位数的数,一个小根堆存储大于等于中位数的数。 当需要输出中位数时,比较一下两个堆的大小,如果差值为 \(2\),则将当前中位数扔进数较少的那个堆里,数较多的那个堆的堆顶取出作为新的中位数。

  • 2021 暑假水题选做2021-07-12 20:31:15

    P1850 先用 Floyd 预处理出任意两点之间的最短路 \(\operatorname{dis}(u,v)\),然后 dp。 设 \(f_{i,j,0/1}\) 表示考虑前 \(i\) 门课,有 \(j\) 门课换教室,第 \(i\) 节课是否换教室的答案。 转移就按照第 \(i\) 次换不换与第 \(i-1\) 次换不换分类: \[\begin{cases} f_{i,j,0}=\min\{

  • LeetCode contest 1022021-06-29 13:54:27

    https://leetcode-cn.com/contest/weekly-contest-102/problems/sort-array-by-parity/ 水题 我的解决方案: class Solution { public int[] sortArrayByParity(int[] A) { int[] B = new int[A.length]; int cnt=0; for(int i=0;i<A.length;i++) {

  • [模拟] aw3655. 楼层(模拟+水题)2021-06-09 21:06:03

    文章目录 1. 题目来源2. 题目解析 1. 题目来源 链接:3655. 楼层 2. 题目解析 没啥好说的,模拟水题。 首先第一层房间就是 1 2 编号,下面第 2~n 层每层都是 x 个房间。也就是查看 n-2 在每行 x 的方阵中的第几行,也就是上取整就行了。是从第二行开始的,最后别忘了加 1。 时间

  • HDU-2602 Bone Collector(01背包讲解+水题应用)2021-06-05 19:01:23

    Bone Collector 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=2602 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector

  • HDU1701 ACMer【水题】2021-05-22 09:06:19

    ACMer Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6539 Accepted Submission(s): 3086 Problem Description There are at least P% and at most Q% students of HDU are ACMers, now I want to know how many

  • [哈希表] lg-P5266 【深基17.例6】学籍管理(哈希表+水题+模板题)2021-05-14 13:57:44

    文章目录 1. 题目来源2. 题目解析 1. 题目来源 链接:P5266 【深基17.例6】学籍管理 2. 题目解析 水题,unordered_map<> 基本使用。 代码: // https://www.luogu.com.cn/problem/P5266 #include <iostream> #include <cstdio> #include <string> #include <unordered_map>

  • 五一训练包 水题2021-05-05 18:33:39

    g-7水题题解:https://vjudge.net/contest/436484#problem/G 题意为找出存在于b数组中的a数组,b数组比a数组多两个数,一个数为a数组的和,另一个数为无关的数。 我的思路一开始局限了,所以正确思路应该是将b数组先求和(记得注意数字范围),然后排序。排序之后能找到两个较大值,就又两种判断,第一种,用

  • 五一训练包 水题2021-05-05 18:01:14

    c-3 水题题解 :https://vjudge.net/contest/436484#problem/C 题意为判断所给的数列能不能由题中所给要求交换数组,使之成为一个递增的数列 题目所给要求是:当存在不满足非递减的两个数组元素时,如果这两个元素的最大公约数等于数组中的最小元素,就可以交换,如果最后交换出来的数组满足

  • 【每日一题】18.华华给月月准备礼物 (水题,二分)2021-04-29 20:04:14

    补题链接:Here 超级基本的二分 贴个代码就溜了 using ll = long long; void solve() { ll n, k; cin >> n >> k; vector<ll> a(n); for (ll &x : a) cin >> x; ll l = 1, r = 1e9, len; while (l <= r) { ll mid = l + r >&

  • AIsing Programming Contest 2020 游记 (ABC水题,D思维)2021-04-28 22:04:12

    补题链接:Here A - Number of Multiples 水题 B - An Odd Problem 水题 C - XYZ Triplets 水题,注意数组不要开小了 D - Anything Goes to Zero 这道题思路很妙: 首先计算出字符串中所有 \(1\) 的数量 \(cnt\) ,然后分三种情况: \(cnt > 1\) 此时我们不难发现对每一位的变化,模数要么

  • 2021团体程序设计天梯赛 L3-3 可怜的简单题2021-04-27 11:03:21

    思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; const int maxn = 100000 + 5; int main() { long long n, m; cin >> n >> m; if(n==1) cout << 1 << endl; else if (n % 2 != 0) cout

  • 2021团体程序设计天梯赛 L1-6 吉老师的回归2021-04-27 10:35:26

    思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; int main() { int n, t, num = 0; string now; cin >> n >> t; getchar(); for (int i = 1; i <= n; i++) { string s; getline(cin, s);

  • L1-058 6翻了 (15 分)2021-04-22 18:33:11

    水题~。 int main() { string s; getline(cin,s); for(int i=0;i<s.size();i++) if(s[i] == '6') { int j=i; while(j<s.size() && s[j] == '6') j++; if(

  • OI日记2021-04-10 22:32:10

    Luogu.com.cn2020年2月27日: luogu P3870 [TJOI2009]开关 线段树模板 CodeForces 1313C1 结论+模拟 CodeForces 1313A 结论 luogu P2306 被yyh虐的mzc 思维+单调队列/二进制优化多重背包 2020年2月28日: luogu P3197 [HNOI2008]越狱 容斥+排列组合+快速幂 luogu P1726 上白泽慧

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

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

ICode9版权所有