Logo Andy0815的博客

博客

#15的奇葩答案(100分版)

2023-04-25 20:29:53 By Andy0815
 #include <bits/stdc++.h>
  using namespace std;
  struct zom{
      string k;
  }a[10];
  int main(){
      a[1].k="hi";
      while(1/1==2){
          int j;
          a[1].k="HI";
          for(int i=1;i<=j;i++){
              j++;
              a[i].k="ctimes";
              cout << "Moscowx";
              cout << a[i].k;
              j--;
          }
      }
      do{
          cout << a[1].k;
      }while(1+1==3);
      return 0;
  }

xushuoxin不是榜一

2023-04-16 20:21:14 By Andy0815
比赛排行榜
#    用户名            Rating
1    昊然               2093
2    xushuoxin        2024

关于#535的k是啥这件事

2023-04-15 10:13:46 By Andy0815

他没有输入或是给我一个准确的定义,怎么办,做不了啊!!

一个可以很快长Rating的方法

2023-03-22 20:05:17 By Andy0815
#我们可以等待低级考试(小比赛),如果有报名,如果没有,定期等待。
参加比赛后,就可以虐菜了。得了第一后,就可以:
Rating值变化通知:
    您的Rating疯狂涨!!!
    从1500一下子涨到2153(比@xushuoxin高1点)。
建议您不要尝试!!!


    别走,我还有个问题:Rating涨到一定高度会掉吗??

关于我好不容易上到1500以上又让老师拉到1千4百多这件事

2023-03-09 09:35:56 By Andy0815

#Rating变化通知 Andy0815 您好: 您在 New Contest 这场比赛后的Rating变化为-67,当前Rating为 1481。**

#Rating变化通知 Andy0815 您好: 您在 New Contest 这场比赛后的Rating变化为+110,当前Rating为 1548。

Rating变化通知

Andy0815 您好:

您在 2023寒假csp模拟赛二 这场比赛后Rating没有变化。当前Rating为 1438。

Rating变化通知

Andy0815 您好:

您在 2023寒假csp模拟赛二 这场比赛后Rating没有变化。当前Rating为 1438。

2023-02-02 10:12:07

Rating变化通知

Andy0815 您好:

您在 2023寒假csp模拟赛二 这场比赛后Rating没有变化。当前Rating为 1438。

2023-02-02 09:45:53

Rating变化通知

Andy0815 您好:

您在 2023寒假csp模拟赛二 这场比赛后Rating没有变化。当前Rating为 1438。

2023-02-01 21:34:29

Rating变化通知

Andy0815 您好:

您在 2023寒假csp模拟赛二 这场比赛后的Rating变化为+39,当前Rating为 1438。

Rating变化通知

Andy0815 您好:

您在 New算法入门比赛 这场比赛后的Rating变化为-15,当前Rating为 1399。

Rating变化通知

Andy0815 您好:

您在 New Contest 这场比赛后的Rating变化为+154,当前Rating为 1414。

Rating变化通知

Andy0815 您好:

您在 New Contest 这场比赛后的Rating变化为-205,当前Rating为 1260。

Rating变化通知

Andy0815 您好:

您在 New Contest 这场比赛后的Rating变化为+146,当前Rating为 1465。

Rating变化通知

Andy0815 您好:

您在 语法2暑假测试3 这场比赛后的Rating变化为-9,当前Rating为 1319。

2022-07-22 14:34:26

Rating变化通知

Andy0815 您好:

您在 暑假测试2 这场比赛后Rating没有变化。当前Rating为 1328。

2022-07-19 15:14:56

Rating变化通知

Andy0815 您好:

您在 暑假测试2 这场比赛后的Rating变化为-272,当前Rating为 1328。

2022-07-19 15:14:24

Rating变化通知

Andy0815 您好:

您在 语法2暑假 这场比赛后的Rating变化为+100,当前Rating为 1600。

新博客

2023-03-05 18:08:02 By Andy0815
#include <bits/stdc++.h>
using namespace std;
bool cmp(int a,int b){
return a>b;
}
int main(){
int n;
cin >> n;
int ID,a[n+5];
for(int i=1;i<=n;i++){
    cin >> a[i];
}
int k;
cin >> k;
sort(a+1,a+n+1,cmp);
for(int i=1;i<=k;i++){
    cout << a[i] << endl; 
}
return 0;
}

新博客

2023-03-05 18:07:01 By Andy0815
#include <bits/stdc++.h>
using namespace std;
int main(){
int ans=0,n=0,sum=0;
for(int i=1;i<=7;i++){
    for(int j=0;j<=7;j++){
        for(int k=0;k<=7;k++){
            ans=i*100+j*10+k;
            if(ans%2==1){
                cout << ans << " ";
                n++;
                if(n%6==0){
                    cout << endl;
                }
                sum++;
            }
            ans=0;
        }
    }
}
cout << sum;
return 0;
}

新博客

2023-03-05 18:05:37 By Andy0815
#include <bits/stdc++.h>
using namespace std;
struct node{
int a;
int b;
int g;
int k; 
};
int main(){
int n;
cin >> n;
node c[n+5];
int x,y;
for(int i=1;i<=n;i++){
    cin >> c[i].a >> c[i].b >> c[i].g >> c[i].k;
}
cin >> x >> y;
int ans=-1;
for(int i=n;i>=1;i--){
    if(x>=c[i].a&&x<=c[i].a+c[i].g&&y>=c[i].b&&y<=c[i].b+c[i].k){
        ans=i;
        break;
    }
}
cout << ans;
return 0;
}

狼人杀(抽身份环节)

2023-02-26 16:56:48 By Andy0815

狼人杀(抽身份环节):

 #include <bits/stdc++.h>
#include <Windows.h>
using namespace std;
int ID;
void brc(int n){
    ID=n;
    switch(n){
        case 1:
            cout << "你是" << ID << "号,";
            cout << "你的身份是: 平民......" << endl;
            Sleep(2000);
            break;
        case 2:
            cout << "你是" << ID << "号,";
            cout << "你的身份是: 狼人......" << endl;
            Sleep(2000);
            break; 
        case 3:
            cout << "你是" << ID << "号,";
            cout << "你的身份是: 平民......" << endl;
            Sleep(2000);
            break;
        case 4:
            cout << "你是" << ID << "号,";
            cout << "你的身份是: 平民......" << endl;
            Sleep(2000);
            break;
        case 5:
            cout << "你是" << ID << "号,";
            cout << "你的身份是: 小丑......" << endl;
            Sleep(2000);
            break;
        case 6:
            cout << "你是" << ID << "号,";
            cout << "你的身份是: 狼人......" << endl;
            Sleep(2000);
            break;
        case 7:
            cout << "你是" << ID << "号,";
            cout << "你的身份是: 平民......" << endl;
            Sleep(2000);
            break;
    }
}
int main(){
    cout << "欢迎来到狼人杀,下面为你抽取身份......" << endl;
    srand(time(NULL));
    Sleep(3000);
    int n=1+rand()%(7-1+1);
    brc(n);
    cout << "游戏即将开始,倒计时五秒:" << endl;
    for(int i=5;i>=1;i--){
        cout << i << endl;
        Sleep(1500);
    }
    bool f=true,k=true,l=true;
    if(ID=2||ID==6)
    cout << "天黑请闭眼,"
    return 0;
}

#2476

2023-02-26 16:45:07 By Andy0815

2476题解

程序如下:

#include<bits/stdc++.h>
using namespace std;
struct zom{
int l;
int w;
};
int n;
bool cmp(zom x,zom y){
if(x.l==y.l){
    return x.w<y.w;
}
return x.l<y.l;
}
int main(){
cin >> n;
zom a[n+5];
for(int i=1;i<=n;i++){
    cin >> a[i].l >> a[i].w;
}
sort(a+1,a+n+1,cmp);
int ans=0,lt=0,wt=0,i=1,k=0;
int b[n+1];
memset(b,0,sizeof(b));
while(k<n){
    ans++;
    lt=0,wt=0;
    while(i<=n){
        if(b[i]==0&&a[i].l>=lt&&a[i].w>=wt){
            lt=a[i].l;
            wt=a[i].w;
            b[i]=1;
            k++;
            if(k==n){
                break;
            }
        }
        i++;
    }
    i=1;
}
    cout << ans;
    return 0;    
} 
共 34 篇博客