【Codeforces】School Regional Team Contest, Saratov, 2011

交互题 codeforces C. Bear and Prime 100 To flush you can use (just after printing an integer and end-of-line): fflush(stdout) in C++; System.out.flush() in Java; stdout.flush() in Python; flush(output) in Pascal; 阅读详情

很久没有更新blog了==

昨天做了cf,成绩不是很理想,这其中有外在因素,因为最近班里比较多活动,只好忍痛割爱搞其他DD。。。==|||

今天的这场cf比较水,很多大牛早早就AK了,tourist还是稳坐第一。。。orz!

ABCD都是水题,这里只贴代码。ps:这次不用standard input output,改用文件形式,搞得一开始返回Idleness limit exceeded on test 1这样奇怪的信息=。=

A

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 305
#define FRE freopen("input.txt","r",stdin)

int main(){freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
    char str[10];
    int n;
    while(scanf("%s%d",str,&n)!=EOF){
    if(str[0]=='f'){
        if(n==1){
            puts("L");
        }
        else
        puts("R");
    }
    if(str[0]=='b'){
        if(n==1){
            puts("R");
        }
        else
        puts("L");
    }
    }
    return 0;
}

B

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 1005
#define FRE freopen("input.txt","r",stdin)
int a[N];
int main(){
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    int n,m;
    while(scanf("%d%d",&n,&m)!=EOF){
        int i,j;
        for(i=1;i<=n;i++)scanf("%d",&a[i]);
        i=m;
        while(1){
            if(i==n+1)i=1;
            if(a[i] == 1){
                printf("%d\n",i);
                break;
            }
            else
            i++;
        }
    }
    return 0;
}

C

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 104
#define FRE freopen("input.txt","r",stdin)
struct node{
    int id;
    int w;
};
priority_queue<node> pp;
int b[N];
bool operator<(node x,node y){
    return x.w<y.w;
}
int main(){
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    int n,k;
    while(scanf("%d%d",&n,&k)!=EOF){
        while(!pp.empty())pp.pop();
        int i,j;
        int sum = 0;
        for(i=0;i<n;i++){
            int a;
            scanf("%d",&a);
            sum += a;
            node t;
            t.w = a;
            t.id = i;
            b[i] = 0;
            pp.push(t);
        }
        int ans = 0;
        while(!pp.empty()){
            node x = pp.top();
            pp.pop();
            if(b[x.id]<3){
                if(x.w<k)continue;
                else{
                    b[x.id]++;
                    x.w -= k;
                    ans += k;
                    pp.push(x);
                }
            }
        }
        printf("%d\n",sum-ans);
    }
    return 0;
}

D

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 54
#define FRE freopen("input.txt","r",stdin)
#define FF freopen("output.txt","w",stdout);

int g[N][N];
int d[3];
int a[N];
int b[N];
int main(){
    FRE;
    FF;
    int n,m;
    while(scanf("%d%d",&n,&m)!=EOF){
        int i,j;
        memset(a,0,sizeof(a));
        memset(b,0,sizeof(b));
        memset(g,0,sizeof(g));
        int sum = 0;
        for(i=0;i<n;i++){
            for(j=0;j<m;j++){
                scanf("%d",&g[i][j]);
                sum += g[i][j];
                a[i] += g[i][j];
            }
        }
      //  cout<<sum<<endl;
        for(i=0;i<m;i++){
            for(j=0;j<n;j++){
                b[i] += g[j][i];
            }
        }
      //  for(i=0;i<n;i++)cout<<a[i]<<" ";puts("");
       // for(i=0;i<m;i++)cout<<b[i]<<" ";puts("");
        scanf("%d%d%d",&d[0],&d[1],&d[2]);
        sort(d,d+3);
        int s[3];
        s[0] = 0,s[1] = 0,s[2] = 0;
        int ans = 0;
        int x[3];
        for(i=0;i<n-2;i++){
            s[0] += a[i];
            if(s[0]>d[2])break;
            s[1] = 0;
            for(j=i+1;j<n-1;j++){
                s[1] += a[j];
                s[2] = sum - s[0] - s[1];
            x[0] = s[0],x[1] = s[1],x[2] = s[2];
            sort(x,x+3);
            if(x[0] == d[0] && x[1] == d[1] && x[2] == d[2])
            ans++;
            }
        }
        s[0] = 0,s[1] = 0,s[2] = 0;
        for(i=0;i<m-2;i++){
        s[0] += b[i];//cout<<s[0]<<" ";
        if(s[0]>d[2])break;
        s[1] = 0;
        for(j=i+1;j<m-1;j++){
            s[1] += b[j];
            s[2] = sum - s[0] - s[1];
            x[0] = s[0],x[1] = s[1],x[2] = s[2];
            sort(x,x+3);
            if(x[0] == d[0] && x[1] == d[1] && x[2] == d[2])
            ans++;
            }
        }
        printf("%d\n",ans);
    }
    return 0;
}

E 博弈。当奇数时,先手必胜策略是先放中心点,然后中心对称着放。

              偶数时,后手必胜策略是与先手中心对称着放。代码很短。

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 105
#define FRE freopen("input.txt","r",stdin)
#define FF freopen("output.txt","w",stdout);
int main(){
    FRE;
    FF;
    int n;
    while(scanf("%d",&n)!=EOF){
        while(n--){
            int m;
            scanf("%d",&m);
            int i,j;
            if(m&1)puts("0");
            else
            puts("1");
        }
    }
    return 0;
}

F

问一棵树最多有几层,dfs即可

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 105
#define FRE freopen("input.txt","r",stdin)
#define FF freopen("output.txt","w",stdout);
vector<int> v[N];
int du[N];
int maxm;
int vis[N];
void dfs(int u,int len){
    int i,j;
    int sz = v[u].size();
    if(du[u] == 1 && !vis[u]){
        vis[u] = 1;//cout<<len<<endl;
        maxm = max(maxm,len);
        return ;
    }
    vis[u] = 1;
    for(i=0;i<sz;i++){
        int x = v[u][i];
        if(!vis[x])
        dfs(x,len+1);
    }
}
int main(){
    FRE;
    FF;
    int n;
    while(scanf("%d",&n)!=EOF){
        int i,j;
        int m;
        for(i=0;i<=100;i++)v[i].clear();
        int ans = 0;
        while(n--){
            scanf("%d",&m);
            for(i=0;i<=100;i++){
                v[i].clear();
                du[i] = 0;
                //vis[i] = 0;
            }
            for(i=1;i<m;i++){
                int a,b;
                scanf("%d%d",&a,&b);
                v[a].push_back(b);
                v[b].push_back(a);
                du[a]++;
                du[b]++;
            }
            maxm = 0;
            for(j=1;j<=m;j++){
                if(du[j] == 1){
                    memset(vis,0,sizeof(vis));
                    vis[j] = 1;
                    dfs(j,0);
                    //break;
                }
            }
            ans += maxm;
        }
        printf("%d\n",ans);
    }
    return 0;
}

G

模拟,英文要过关,因为题目中貌似有些歧义(就我而言)。

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 105
#define FRE freopen("input.txt","r",stdin)
#define FF freopen("output.txt","w",stdout);
int a[N][2];
int c[N];
int d[N][N];
string str[N];
vector<string> ans[N];
int main(){
    FRE;
    FF;
    int n,t;
    scanf("%d%d",&n,&t);
        int i,j;
        for(i = 0; i < n; i++){
            int a1,b1,a2,b2;
            scanf("%d%d%d%d",&a1,&b1,&a2,&b2);
            a[i][0] = a1 + b2;
            a[i][1] = a2 + b1;
        }
        int m;
        scanf("%d",&m);
        for(i = 0;i < m; i++){
            cin>>str[i];
            scanf("%d",&c[i]);
        }
        queue<int> qq;
        for(i=0;i<m;i++)qq.push(i);
        for(int who = 0,i = 0;!qq.empty(); ){
            for(int tt = 0;!qq.empty(); ){
                int x = qq.front();
                qq.pop();
                int tmp = max(1,c[x] - a[i][who] - d[i][x]);
                if(tt+tmp > t){
                    qq.push(x);
                    d[i][x] += t - tt;
                    break;
                }
                else{
                    ans[i].push_back(str[x]);
                    tt += tmp;
                }
                if(tt == t)break;
            }
            i++;
            if(i == n){
                i = 0;
                who ^= 1;
            }
        }
        for(i=0;i<n;i++){
            cout<<(int)ans[i].size();
            for(j=0;j<ans[i].size();j++){
                cout<<" "<<ans[i][j];
            }
            puts("");
        }
        return 0;
}

H

匹配。列出每个单词所有长度<=4的组合,然后匹配就ok。

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 205
#define FRE freopen("input.txt","r",stdin)
#define FF freopen("output.txt","w",stdout);
map<string,int> mp;
string ss[80000];
int match[80000];
vector<int> v[N];
bool vis[80000];
int cnt;
int get(char *s){
    if(mp.find(s) == mp.end()){
        ss[cnt++] = s;
        mp[s] = cnt - 1;
        return cnt - 1;
    }
    return mp[s];
}
bool gao(int u){
    int i,j;
    for(i = 0; i<v[u].size(); i++){
        int x = v[u][i];
        if(!vis[x]){
            vis[x] = 1;
            if(match[x] == -1 || gao(match[x])){
                match[x] = u;
                return true;
            }
        }
    }
    return false;
}
int out[N];
int main(){
    FRE;
    FF;
    int n;
    scanf("%d",&n);
        int a,b,c,d;
        int i,j;
        char  s[5];
        char str[15];
        cnt = 0;
        for(i=0;i<n;i++){
            scanf("%s",str);
            int len = strlen(str);
            for(a = 0;a < len ;a++){
                s[0] = str[a];s[1] = '\0';
                v[i].push_back(get(s));
                for(b = a+1; b < len; b++){
                    s[1] = str[b];s[2] = '\0';
                    v[i].push_back(get(s));
                    for(c = b+1; c < len; c++){
                        s[2] = str[c];s[3] = '\0';
                        v[i].push_back(get(s));
                        for(d = c+1; d < len; d++){
                            s[3] = str[d];s[4] = '\0';
                            v[i].push_back(get(s));
                        }
                    }
                }
            }
        }
        bool flag = 1;
        memset(match,-1,sizeof(match));
        for(i = 0; i < n; i++){
            memset(vis,0,sizeof(vis));
            if(!gao(i)){
                flag = 0;
                break;
            }
        }
        if(flag){

            for(i = 0; i < cnt; i++){
                if(match[i] != -1){
                    int x = match[i];
                    out[x] = i;
                }
            }
            for(i=0;i<n;i++)cout<<ss[out[i]]<<endl;
        }
        else
        puts("-1");
    return 0;
}

I

额。。。不会做>_<,没思路啊!!!

J

把所有点取绝对值,转化成求平面上最小点对,最后跟原数比较一下就知道是1、2、3、4哪种情况。注意先对点排序,否则会TLE

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <time.h>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <cstdlib>
#include <limits.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#define LL long long
#define MIN INT_MIN
#define MAX INT_MAX
#define PI acos(-1.0)
#define N 100005
#define FRE freopen("input.txt","r",stdin)
#define FF freopen("output.txt","w",stdout);
int sqr(int n){
    return n*n;
}
int abs(int n){
    return n > 0 ? n :-n;
}
struct node{
    int x,y;
    int id;
   bool operator < (node b) const {
       if(abs(x)!= abs(b.x))return abs(x) < abs(b.x);
       return abs(y) < abs(b.y);
   }
   int getMod(int ca){
       int ret;
       if(x >= 0 && y >= 0)ret = 1;
       else
       if(x < 0 && y >= 0)ret = 2;
       else
       if(x > 0 && y < 0)ret = 3;
       else
       if(x < 0 && y < 0)ret = 4;
       return (ca == 1) ? ret : (5 - ret);
   }
}p[N];
int main(){
    FRE;
    FF;
    int n;
    while(scanf("%d",&n)!=EOF){
        int i,j;
        for(i=0; i<n; i++){
            scanf("%d %d",&p[i].x,&p[i].y);
            p[i].id = i+1;
        }
        sort(p,p+n);
        int minm = MAX;
        int a,b;
        for(i=0;i<n;i++){
            for(j = i+1; j < n; j++){
                if(sqr(abs(p[i].x) - abs(p[j].x)) > minm )break;
                int tmp = sqr(abs(p[i].x) - abs(p[j].x)) + sqr(abs(p[i].y) - abs(p[j].y));
                if(tmp < minm ){
                    minm = tmp;
                    a = i;
                    b = j;
                }
            }
        }
        printf("%d %d %d %d\n",p[a].id,p[a].getMod(1),p[b].id,p[b].getMod(2));
    }
    return 0;
}


关于Time Limit Exceeded可能的原因 今天在做POJ上面的一道题目《M × N Puzzle》,Problem ID:2893,测试全部通过,就是提示超时,在网上找到原题源码对比发现逻辑上一模一样。。。然后最后的最后终于找到问题了,在这篇Why do I get a Time Limit Exceeded?文章中提到 In C++, do not use cin/cout - use scanf and printf instea 阅读详情

相关推荐

【GPIO模拟串口通信协议】

由于这段时间搞了个安卓相关的项目,需要和安卓进行Uart通信。但是选用的芯片并没有自带uart功能,所以在充分评估项目后,考虑波特率不高的情况下,决定使用GPIO去模拟串口通信协议了。

学海无涯苦作舟 2642

关于交互题---Idleness limit exceeded(codeforces)

Idleness limit exceeded的中文:懒惰超过限制。----来自有道翻译 大概意思是在该输出的情况下没有输出数据 比如这个:   而且一般都会提醒你:(在每条输出之后加) After outputting each line, don't forget to flush the output. For example: fflush(stdout) in C/C++...

xuanweiace的博客 6612

ANSYS APDL实战:手把手教你搞定电磁-热耦合分析(附完整命令流)

本文通过一个工业感应加热线圈的实战案例,手把手教你使用ANSYS APDL完成电磁-热耦合分析。内容涵盖从几何建模、材料定义、网格划分到加载求解及后处理的完整流程,重点讲解了使用PLANE13单元进行双向耦合场分析的方法与命令流调试技巧,助力工程师快速掌握这一核心仿真能力。

weixin_29284201的博客 440

D. Lost Tree【树的二分图性质】——Codeforces LATOKEN Round 1 (Div. 1 + Div. 2)

树的性质: 一棵树是二分的,可以被染成2种颜色交错 距离为1为相邻,则看第一个后取奇偶少的的那一部分。 关于交互题的Idleness limit exceeded on test 1: 不是最后来一个 fflush(stdout); 也不是C++才需要,而是每一句输出都立刻加一句。 #include<bits/stdc++.h> using namespace std; #ifdef LOCAL FILE*FP=freopen("text.in","r",stdin); #endif #def

出尘的博客 817

CLion for Mac(m1)配置GCC编译器

条件:电脑已经下载过XCode 一. 下载HomeBrew homebrew是一款macos,linux下的包管理工具,我们需要使用他来下载GCC 下载方法: 1.打开终端(terminal) 2.输入 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ps.有可能会遇到的问题 我当初下载挂了VPN,CSDN上还有很多解决问题的方法,可以将错误信

supermario19的博客 7852

生成式引擎优化(GEO)的概念与技术路径

生成式引擎优化(GEO)是针对生成式AI引擎的新型优化策略,旨在提升内容在AI搜索与问答平台中的可见性和可信度。与传统SEO相比,GEO更注重语义理解、知识图谱和多模态生成等技术,通过优化内容的结构化和平台适配性,使品牌信息在生成式AI中更易被采纳和呈现。其核心技术包括语义理解、向量数据库和实时反馈优化等,应用于品牌传播、智能客服和个性化推荐等领域。随着AI技术发展,GEO将向智能化、自动化方向演进,成为内容优化的重要工具。

Baixue5209的博客 1052

刷OJ时的常见错误

time limit exceeded:超时,考虑换个思路。 runtime error:指针下标越界等(数组不够长)。 idleness limit exceeded: printf();后加fflush(stdin)。 assignment to expression with array type:数组类型不匹配,需要换一种赋值方式。...

selma_story的博客 977

[ADS]单端电感和差分电感的感值和Q值计算公式

单端电感和差分电感的感值和Q值计算公式

乾巽的博客 1万+

关于codeforces的Idleness limit exceeded

被cf上的Idleness limit exceeded 错误给整惨了,写篇博客总结一下(可能找到新问题,以后续更)     这个Idleness limit exceeded 貌似指的是太懒(笑哭)在该输出的情况下没有输出数据(详见二) 一:以任意两道题为例 注意题目要求输入输出格式,文件输出或者标准输入输出,详见传送门 点我点我打开讨论 freopen("input.tx

A 1万+

华为eNSP Pro实战:NE/CE设备SSH远程配置避坑指南

本文针对华为eNSP Pro用户在模拟多台NE路由器或CE交换机时遇到的浏览器卡顿问题,提供了详细的SSH远程配置避坑指南。通过对比浏览器与SSH客户端的资源占用和操作体验,文章详细阐述了为NE和CE设备配置SSH服务的关键步骤、命令差异及常见错误排查方法,旨在帮助用户提升实验效率,实现稳定高效的远程管理。

weixin_29196891的博客 237

Open3D (C++) KD tree的使用【2025最新版】

Open3D (C++) KD tree的使用,博客长期更新,本文最近更新时间为:2025年1月6日。

点云侠的博客 1570

2024 暑假友谊赛 2补题情况

再交C题的时候发现了一个之前都没有见过的报错(Idleness limit exceeded on test 1),然后就不知道该如何去改。赛后查了一下是测试用例 1 的执行过程中出现了长时间的闲置状态,超出了平台设定的空闲时间限制。简单来说就是要去优化算法,使代码执行相同程序的情况下使用时间更短。

2301_80357816的博客 753

飞塔CVE-2022-40684复现

admin 无密码直接回车(会提示修改密码)

G3et的博客 1153

Codeforces 755-C. PolandBall and Forest(交互式题)

题目链接 题目大意: 给你n个点,每个点给出所在树的距离自己最远距离的点。问这个森林有多少棵树。PS:第一次交这种交互式的题。。交了一发给出了Idleness limit exceeded on test 1。一脸懵逼。查了一下发现这种题是用文件读入? 读入不能超过所需,否则就会出现这样的错误。 如果是用printf输出,需要在后面添上fflush(stdout),将

No Program No Life 765

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Codeforces Round 897 (Div. 2)(VP-9,寒假加训)

Idleness limit exceeded on test 1 这种错误要

Lanthamum的博客 733

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

问题笔记

关于类型 CodeBlocks使用mingw编译器,long long类型输出表示为"%I64d",且__int64合法; EOJ使用的似乎是g++的linux版本编译器,long long类型输出表示为"%lld",且__int64不合法。 long double类型是合法的,但是在mingw编译器中不能格式化输入/输出。"%llf","%Lf"这些都不行。 关于ILEIdleness Limit

Mercury 461

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

CF AIM Tech Round 4上紫记

本来CF Round427就已经有1865rating了,当时扬言要一战上紫,结果后面两场CF一场-5,一场+2,直到现在才达成目标,可惜暑假结束前或许不再有div1的round了。 这场cf时常2.5小时(然而前108分钟拿到了所有分数)。 开场看A题,以为hack点很多(flag*1,后来发现是真的),过了5分钟才AC,然后15分钟时切了B题,30分钟时切了C题,一看standing,还在2

zx2003的博客 641

C. Guess the Array(codeforces)

C. Guess the Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output This is an interactive problem. You shoul

Dreamlandz的博客 695

Educational Codeforces Round 65 (Rated for Div. 2) May/15/2019

(原题直通车)https://codeforces.com/contest/1167 难过的我又掉了19分!!!! A题: 难度仅仅比Hello world难一点。问可不可以变成电话号码必须满足8开头11位数,就看一下距离第一个8 有多远,如果总长度减去该长度不满11则输出NO。 #include <iostream> #include <algorithm> #...

codehappy123的博客 247

【计几】平面最短欧氏距离点对题集

文章目录[SPOJ - Closest Triplet【最小周长三角形】](https://vjudge.ppsucxtt.cn/problem/SPOJ-CLOSEST)[[codeforces] - [School Regional Team Contest, Saratov, 2011]-Minimum Sum【最小向量和】](https://codeforces.com/contest/120/problem/J)[codeforces429D - Tricky Function](https://

ZhgDgE的博客 407

Gym101375H MaratonIME gets candies 题解

原题 https://codeforces.com/gym/101375/problem/H 题目大意 猜数游戏,新手入门都会写的东西……应该是每一个人写的第一个游戏? 题目分析 遇到的第一条交互题,一开始返回个Idleness limit exceeded把我给楞住了,虽然作为一个cpp选手,但我还是喜欢用cstdio的,不过iostream的输出语句自带flush,而cstdio的没有……嗯...

juseice的博客 814

Codeforces Round #134 (Div. 2)

Codeforces Round #134 (Div. 2) 这次cf竟然在下午3:00开始,非常开心的注册然后就悲剧了,开始第二题,第三题都是很快的1A,然后看第一题,交上去判了我一个莫名其妙的错误,Idleness limit exceeded on pretest 8,然后我以为我题意理解错了,各种看题……实在没看出来第一题,错在哪了,我又直接看第四题,写了个dfs()虽然我知道这样肯定超

态度决定高度 1018

ACM中关于Output Limit Exceeded和Time Limit Exceeded

Output Limit Exceeded 多数发生在递归遍历的过程中,多输出了一些内容(比如说空格)。Output Limit Exceeded还指如果输入某一组数据,你的程序返回的结果是一直输出某个结果,死循环输出的那种。Time Limit Exceeded,如果你相信你的算法是最优的,那就检查一下什么地方在什么数据下出现了死循环。否则还是考虑换个思路解题的好。TLE除了死循环就是算法问题。

穹顶之下 4万+

binary string codeforces 862D 交互题,二分答案

D. Mahmoud and Ehab and the binary string time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud and Ehab

SUNSET 1075

Carnival Slots dfs+dp

Carnival Slots Time limit 1500 ms Memory limit 262144 kB You go to the carnival and come across a nice little game. The carnival worker shows you the setup of the game, which can be represented as a 2...

unightmare_siya的博客 463
上一篇: 实验
下一篇: 【矩阵运算+模板】
leolin_
博客等级 码龄16年 96粉丝 411原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值