ICode9

精准搜索请尝试: 精确搜索
  • poj 2583(水题)2021-11-29 16:34:34

    #include<iostream> using namespace std; int main(){ double a,b,c,f0,f1,f2,f3,f4,f5; while(scanf("%lf%lf%lf",&f0,&f1,&f2)==3){ c = f0; a = (f2-2*f1+f0)/2.0; b = f1-f0-a; f3 = 9*a+3*b+c;

  • 等值数目(过河拆桥)2021-11-28 20:01:23

    本来这是道水题 结果写了一遍卡了十分钟,逻辑问题。 本该放弃这个方法的,仍不死心,于是乎想到了过河拆桥这招 #include<stdio.h> int main() { int m,n,i,j,k = 0,count = 0,a[1001],b[1001]; scanf("%d %d",&n,&m); for(i = 0;i<n;i++) scanf("%d",&a[i]); for(i = 0;i<m;i+

  • 插入排序 (水题)2021-11-23 23:58:01

    描述 有n(n<=100)个整数,已经按照从小到大顺序排列好,现在另外给一个整数m,请将该数插入到序列中,并使新的序列仍然有序。 输入 输入数据包含多个测试实例,每组数据由两行组成,第一行是n和m,第二行是已经有序的n个数的数列。n和m同时为0标示输入数据的结束,本行不做处理。 输出 对于每

  • poj 2249(水题,数据类型要是long long不能是int)2021-11-18 18:34:23

    #include<iostream> using namespace std; int main(){ long long n,k,i,j,ans; while(scanf("%lld%lld",&n,&k)==2&&n){ if(n-k<k){ k = n-k; } ans = 1; for(i=1,j=n;i<=k;i++,

  • poj 2301(水题)2021-11-18 18:31:07

    #include<iostream> using namespace std; int main(){ int a,b,n,c,d; scanf("%d",&n); while(n--){ scanf("%d%d",&a,&b); if((a+b)%2==1||a<b){ printf("impossible\n");

  • poj 1936(水题)2021-11-17 11:02:28

    #include<iostream> #include<cstring> using namespace std; int main(){ char a[100005],b[100005]; int i,j,len_a,len_b; while(scanf("%s%s",a,b)==2){ len_a = strlen(a); len_b = strlen(b); j = 0;

  • poj 1607(水题)2021-11-14 18:03:48

    #include<iostream> using namespace std; int main(){ int cnt,i,data[105]; double ans[105]; cnt = 0; while(scanf("%d",&data[cnt])==1){ ans[cnt] = 0; for(i=1;i<=data[cnt];i++){ ans[cnt] += 0.

  • poj 1663(水题)2021-11-14 18:02:01

    #include<iostream> using namespace std; int main(){ int n,a,b; scanf("%d",&n); while(n--){ scanf("%d%d",&a,&b); if(a==b){ if(a%2==0){ printf("%d\n",a*

  • poj 1326(水题)2021-11-14 17:32:21

    #include<iostream> #include<cmath> #include<cstring> using namespace std; int main(){ int sum,mile; char a[2][20],icon[2]; while(true){ sum = 0; while(true){ scanf("%s",a[0]);

  • 【UOJ 84】水题走四方(DP)2021-11-14 10:04:53

    传送门 题意 给定一棵 \(n\) 个点的有根树。初始有 \(2\) 个人在根结点。每 \(1\) 秒内,每个人要么走向某个儿子,要么停在原地不动。当两人都在某个结点上时,其中一人可以立即传送到另一个人的位置上。最后要求每个结点都被至少经过一次,问总共花费的最小时间。 \(n \le 5\times10^6\)

  • poj 3618(水题)2021-11-13 12:31:43

    #include<iostream> #include<algorithm> #include<cmath> using namespace std; int cmp(int a,int b){ return abs(a)<abs(b); } int main(){ int i,t,n,data[50005]; scanf("%d%d",&t,&n); for(i=0;i<n;i++){

  • UOJ#84-[UR #7]水题走四方【dp】2021-11-12 16:34:06

    正题 题目链接:https://uoj.ac/problem/84 题目大意 有\(n\)个点的一棵树,\(1\)为根,两个人从根节点往下走(只能从深度小的点走到深度大的点)。 两个人每一秒都可以一条边(也可以不移动),或者不消耗时间将一个人传送到另一个人那里。 求遍历整棵树需要的最少时间。 \(1\leq n\leq 5\time

  • poj 3366(水题,注意continue的使用)2021-11-11 13:02:49

    #include<iostream> #include<cstring> using namespace std; int main(){ char irr[25][2][25],tgt[25],vowel[]={'a','e','i','o','u'},tail[]={'o','s','x'},tails[][5]

  • poj 1035(水题,注意增删时的操作)2021-11-11 10:03:30

    #include<iostream> #include<cstring> using namespace std; int main(){ char dict[10005][20],tar[20],tmp[20]; int count,i,j,diff_num; bool flag; count = 0; while(scanf("%s",tmp)==1&&strcmp(tmp,"#")

  • poj 1051(水题,注意memset的使用和字符串操作)2021-11-10 19:32:01

    #include<iostream> #include<cctype> #include<cstring> #include<string> using namespace std; int main(){ char a[][5] = {".-","-...","-.-.","-..",".","..-.","--.&qu

  • poj 1547(水题)2021-11-10 09:02:51

    #include<iostream> using namespace std; int main(){ int n; int x,y,z,data[10]; char name[10][10]; int maxv,minv,maxi,mini; while(scanf("%d",&n)==1&&n!=-1){ maxv = -1; minv = 9999; for

  • P4626 一道水题 II2021-11-08 08:32:16

    Jisoo 大家都知道,对于两个数 \(a,b\)的\(lcm\),只要求去每个质数因数的较大的幂乘起来就行了。然后卡卡时 #include<cstdio> #include<iostream> #include<cstring> #include<iomanip> #include<cmath> #include<stack> #include<algorithm> #include<bitset>

  • codeforces 753-div3 D(现在只会做水题了呜呜呜)2021-11-03 23:04:05

    题目 题意: 给定n个数,每个数具有B或者R属性之一。B表示该数可以执行任意次-1,R表示该数可以执行任意次+1。判断这n个数能否凑出一个permutation。 思路: 我直接线段树维护,发现没过样例,确实越来越菜了。 冷静分析,可以把b和r属性的数分别维护,进行排序。 之后按照数值now从小到大

  • 【第一道水题】A. Two Subsequences2021-10-26 18:32:50

    题目来源:Problem - A - CodeforcesCodeforces. Programming competitions and contests, programming communityhttps://codeforces.com/contest/1602/problem/A 题干:  第一道水题,结果被想复杂了。这个只需要将字符串进行排序,然后输出一个最小元素和一个缺少最小元素的字串即

  • 21.10.17模拟 绵羊2021-10-18 09:33:40

    给出一个完全图唯一最小生成树,求完全图所有边权的和 考场想到n^2log的计算,枚举两点再求出两点路上最长边再判断要不要+1.没想到就是个kruskal水题 const int N = 23007; struct edge { int x, y, z; bool operator <(const edge&rhs) const { return z < rhs.z; } } t[N]; in

  • [NOIP2011 普及组] 表达式的值2021-10-04 13:34:00

    [https://www.luogu.com.cn/problem/P1310]([NOIP2011 普及组] 表达式的值) 神仙题, 被吊着打qaq 这不就是一个求表达式树的后序遍历吗. \(—zwd\) 水题。 水题。 虐了我两次。 qaq 然后就开始了表达式的恶补 首先是把表达式转成后缀表达式 因为好求 转的方法: 如果有数字

  • 假期水题~2021-10-02 17:05:25

    1 成功上传拿到上传地址,尝试修改后缀名 没有阻拦的绕了过去,直接上蚁剑吧 翻了一圈没找到flag,找到了数据库数据连接看看 不断点击数据库发现了藏着flag的地方 点击之后没有直接出现flag,而是要执行SQL语句将flag读取出来 2 莫不是签到题,直接传php文件吧 上传之后没

  • acwing水题总计2021-10-02 14:30:07

    https://blog.csdn.net/m0_61067261/article/details/120585478?spm=1001.2014.3001.5501https://blog.csdn.net/m0_61067261/article/details/120585478?spm=1001.2014.3001.5501 672. 税(acwing水题记)_m0_61067261的博客-CSDN博客读取一个保留两位小数的浮点数值,表示一个公民的

  • 【luogu U138101】字符串水题(SAM)(树状数组)2021-09-30 17:32:54

    字符串水题 题目链接:luogu U138101 题目大意 给你一个大字符串,然后每次给你一个小字符串和 l,r,问你有多少个小字符串的子串满足它是大字符串的子串,而且它每个字符作为数字之和在 l~r 之间。 (保证字符串都是由数字构成) 思路 首先不难看出首先可以 SAM 或者 SA(这个要把所有字符串拼

  • L1-003 个位数统计 (15 point(s))2021-09-25 20:34:13

    没啥好说的又写了一次的水题。 #include <bits/stdc++.h> using namespace std; int main(){ string str; cin >> str; map<char, int> ans; for(auto s: str) ans[s]++; for(auto a: ans) cout << a.first << ":" << a.second <

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

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

ICode9版权所有