ICode9

精准搜索请尝试: 精确搜索
  • DP水题乱作2021-09-24 17:35:01

    George and Job 设 \(f_{i,j}\) 表示前 \(i\) 数选了 \(j\) 个区间。 不难得出转移方程 \(f_{i,j}=max(f_{i-m,j-1}+sum[i]-sum[i-m-1])\)。 其实前四道题都可以秒 Star sky 因为 \(c\) 最大为 \(10\),我们考虑将时间按 \(\mod c\) 分类,可以发现同一类的答案都是类似的。 我们对于

  • TheZealous的赛前水题日常之 洛谷 P1068 [NOIP2009 普及组] 分数线划定(排序+模拟)2021-09-14 12:32:12

    【题目】 戳这里   【审题】 1.取前floor(m*1.50)个最大的之后还要带上与第floor(m*1.50)个分数相同的元素 2.相同成绩,id小的靠前   【分析】 1.对成绩和编号进行排序,成绩按逆序排序 2.排序后第floor(m*1.50)个人的成绩一定是基准线 3.从第floor(m*1.50)+1个人开始枚举,找出与第f

  • A. Expression【1000 / 水题】2021-09-13 19:31:19

    https://codeforces.com/problemset/problem/479/A #include<bits/stdc++.h> using namespace std; int ans=0; int main(void) { int a,b,c; cin>>a>>b>>c; ans=max(ans,a+b+c); ans=max(ans,a+b*c); ans=max(ans,a*(b+c)); ans=max(ans,(a+b)

  • A. Beautiful Matrix 【水题 / 曼哈顿距离】2021-09-11 19:03:05

    https://codeforces.com/problemset/problem/263/A #include<bits/stdc++.h> using namespace std; int a[10][10]; int x,y; int main(void) { for(int i=1;i<=5;i++) for(int j=1;j<=5;j++) { cin>>a[i][j]; if(a[i][j]) x=i,y=j; } cou

  • 搞单片机程序开发应该掌握哪些技能,实际用到什么?2021-09-11 10:02:17

    需要掌握哪些技能需要了解并使用过几款常见的单片机。需要熟悉常见的硬件接口譬如 UART 、SPI 、I2C需要了解一些传感器相关的知识,譬如声、光、磁、温、惯性器件需要能看懂 datasheet 读懂芯片的操作规范,就是用代码对传感器的寄存器进行配置能读懂原理图、看懂 PCB会使用示波器

  • A. Team【水题】2021-09-07 10:01:44

    https://codeforces.com/problemset/problem/231/A #include<bits/stdc++.h> using namespace std; int ans; int main(void) { int t; cin>>t; while(t--) { int a,b,c; cin>>a>>b>>c; int sum=a+b+c; if(sum>=2) ans++; } cou

  • 两个水题和两个大水题的故事2021-09-06 22:00:20

    四道数论题 目录T1 P3232 [HNOI2013]游走T2 P3214 [HNOI2011]卡农T3 CF722F Cyclic CipherT4 P4240 毒瘤之神的考验 T1 P3232 [HNOI2013]游走 题目大意 给定一张无向图,从\(1\)号点开始每次等概率地走向与它联通的点,直到走到\(n\)号点为止,求在最好的对\(m\)条边进行\(1\)~\(m\)标号

  • Codeforces Round #733 (Div. 1 + Div. 2)题解2021-09-02 23:34:02

    快两年没有碰OI了orz,打一次直接橙变紫掉200分。   A题 水题 B题 水题 C题 水题 D题   贪心,可以想到有多少个不同的a[i]就有多少最终答案。匹配上,贪心选择,然后乱匹配。如果发现i自己对应自己了,那么将i对应向a[i],而a[i]对应的人对上自己就可以了。 #include<algorithm> #inclu

  • CF水题题解2021-08-28 07:31:28

    Pre 本弱实在是太弱了,身边的大佬们切题如喝水,而我昨天A+B做了快一个小时。。。 写一下简要的题意和收获,暂时只打算改ABCD,也许能力强一点(根本不会发生的事)之后会改EF。 #Round 740 A 纯模拟 B 算出一个人需要反转几次才能赢,然后枚举他赢得次数。 因为每次赢都可以和一次输反转加两

  • poj 1035(水题,枚举)2021-08-19 13:32:09

    #include<iostream> #include<cstdio> #include<cstring> using namespace std; char data[10005][20],t[20],ans[10005][20]; int cnt_ans,count; void cmp(){ int i,j,k,l; for(i=0;i<count;i++){ int len_d = strlen(data[i]);

  • poj 3589(水题)2021-08-18 02:02:20

    #include<iostream> #include<cstdio> using namespace std; int main(){ int t,ansa,ansb,data[5],target[5]; char a[5],b[5]; scanf("%d",&t); while(t--){ ansa = ansb = 0; scanf("%s%s",a,b);

  • poj 2136(水题)2021-08-13 19:03:37

    #include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ int i,j,col,data[30],ans[30][305],pos[305]; char a[4][100]; memset(data,0,sizeof data); for(i=0;i<4;i++){ gets(a[i]);

  • poj 3979(水题)2021-08-10 21:33:03

    #include<iostream> #include<cstdio> #include<cstring> using namespace std; int gcd(int a,int b){ int t; if(a==0)return b; while(b){ t = a%b; a = b; b = t; } return a; } int main(){ int t,a,

  • 基础DP 水题乱做2021-08-06 11:34:15

    本人dp零基础,题解写的水平不高,欢迎巨佬评论%%%,另:真的很水,大佬可以跳过 NOIP2007 T3 洛谷P1095 Description 守望者在与尤迪安的交锋中遭遇了围杀,被困在一个荒芜的大岛上。 为了杀死守望者,尤迪安开始对这个荒岛施咒,这座岛很快就会沉下去。到那时,岛上的所有人都会遇难。 守望者的跑

  • poj 1700(水题,找规律)2021-08-05 19:31:53

    #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int main(){ int i,t,n,data[1005],ans,x,y; scanf("%d",&t); while(t--){ scanf("%d",&n); for(i=0;i<n;i++

  • 那年那些最短路水题2021-08-04 19:35:26

    A. 最短路径问题 模板题。 #include<bits/stdc++.h> using namespace std; int ans,n,m,s,t,mini; double g[1001][1001],lost[1010],mn; bool b[1101]; int x[1001],y[1001]; void mst() { memset(lost,0x7f,sizeof lost); memset(b,1,sizeof(b)); lost[s]=0; while(1) { mn=INT_

  • poj 1102(水题)2021-08-02 12:06:09

    #include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ int s,len,p,i,j,k; char n[10],d[25][100]; while(scanf("%d%s",&s,n)!=EOF,s){ len = strlen(n); for(i=0;i<le

  • poj 3664(水题,结构体排序)2021-08-01 22:31:47

    #include<iostream> #include<algorithm> using namespace std; struct Node{ int id,a1,a2; }vote[50005]; bool cmp(struct Node v1,struct Node v2){ return v1.a1>v2.a1; } int main(){ int n,k,ans,ansi; scanf("%d%d",&n,

  • poj 3637(水题)2021-08-01 22:00:23

    #include<iostream> #include<algorithm> #include<cstdio> using namespace std; bool cmp(int a,int b){ return a>b; } int main(){ int t,n,a[20005]; scanf("%d",&t); while(t--){ scanf("%d",&am

  • poj 3173(水题)2021-08-01 01:03:09

    #include<iostream> #include<cstdio> using namespace std; int main(){ int n,seed,d[20][20]; scanf("%d%d",&n,&seed); for(int j=0;j<n;j++){ for(int i=0;i<=j;i++){ d[i][j] = seed;

  • poj 2924(水题)2021-07-31 22:32:11

    #include<iostream> #include<cstdio> using namespace std; int main(){ long long n,m,i,ans; scanf("%lld",&i); for(int kase=1;kase<=i;kase++){ scanf("%lld%lld",&n,&m); printf("Sc

  • 2665(水题)2021-07-31 22:04:34

    #include<iostream> #include<cstdio> using namespace std; int main(){ int l,m,s,e,ans; while(scanf("%d%d",&l,&m)==2&&l){ ans = l+1; while(m--){ scanf("%d%d",&s,&e);

  • poj 2583(水题)2021-07-31 21:03:34

    #include<iostream> #include<cstdio> using namespace std; int main(){ int k1,k2,k3,a[3]; while(scanf("%d%d%d",&k1,&k2,&k3)==3){ a[0] = k1-3*k2+3*k3; a[1] = 3*k1-8*k2+6*k3; a[2] = 6*k1-15*k2+

  • poj 2301(水题)2021-07-31 15:34:49

    #include<iostream> #include<cstdio> using namespace std; int main(){ int s,d,p,q,n; scanf("%d",&n); while(n--){ scanf("%d%d",&s,&d); if(d>s||(s-d)%2==1) printf("impossible

  • poj 2196(水题)2021-07-31 10:32:04

    #include<iostream> #include<cstdio> using namespace std; bool test(int n){ int p,s1,s2,s3; s1 = s2 = s3 = 0; p = n; while(p>0){ s1 += p%10; p /= 10; } p = n; while(p>0){ s2 += p%12;

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

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

ICode9版权所有