社区讨论

全TLE,不解。

P8706[蓝桥杯 2020 省 AB1] 解码参与者 2已保存回复 1

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
1 条
当前快照
1 份
快照标识符
@lu0xpaej
此快照首次捕获于
2024/03/21 15:52
2 年前
此快照最后确认于
2024/03/21 18:48
2 年前
查看原帖
CPP

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string>
#include <string.h>
#include <vector>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <queue>
#include <bitset>
#include <list>
#include <stack>
#define ll long long
#define pii pair<int,int>
#define ull unsigned long long
using namespace std;

// ios::sync_with_stdio(0);
//    cin.tie(0);
//    cout.tie(0);


int main() {

 ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    char c,t;
    while((c=getchar())!='\n'){
        if(isalpha(c)){
            cout << c;
            t = c;
        }else if(isalnum(c)){
            int x = c-'0';
            for(int i =0;i<x-1;i++){
                cout << t;
            }
        }else{
            cout << c;
        }
    }

    return 0;
}

回复

1 条回复,欢迎继续交流。

正在加载回复...