代码里有子串pragma就不能交吗。。。

P1001 A+B Problem

Rainbow_qwq @ 2020-09-26 14:38:25

这也禁的太彻底了吧

下面这个不能交:

#include<bits/stdc++.h>
using namespace std;
int pragma,GCC,optimize=2;
int main(){
    cin>>pragma>>GCC;
    cout<<pragma+GCC;
    return 0;
}

下面这个也不能交:

#include<bits/stdc++.h>
using namespace std;
//int pragma,GCC,optimize=2;
int main(){
//  cin>>pragma>>GCC;
//  cout<<pragma+GCC;
    int a,b;
    cin>>a>>b,cout<<a+b;
    return 0;
}

by tiger0134 @ 2020-09-26 14:44:33

这是 g++ -E 之后模式匹配了一遍?


by chenpengda @ 2020-09-26 14:47:06

啊这


by zhoukangyang @ 2020-09-26 14:50:02

qp % sjy


by DOCTYPE_OIers @ 2020-09-26 15:16:54

其实只需要搜 #pragma 子串,如果包含的就不准提交就行了罢


by pigstd @ 2020-09-26 21:40:16

qp % sjy


by Implicit @ 2020-09-27 18:18:40

@DOCTYPE_OIers

你这个 # 后面加几个空格不就躲过去了


by DOCTYPE_OIers @ 2020-09-27 18:40:22

@LoveMC 先统一去格式化,再查找


by juzi75 @ 2020-10-05 19:43:43

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b;
    cin>>a>>b;
    cout<<a+b;
    return 0;
}

by esquigybcu @ 2021-07-13 20:18:34

这玩意实测可交

#include <stdio.h>

int main()
{
    int pragma, GCC, optimize;
    scanf("%d %d", &pragma, &GCC);
    printf("%d", pragma + GCC);
    return 0;
}

|