Simple (noip) beat the wording of the CSP

In Case a + b

This is a random data

#include<iostream>
#include<cstdio>
#include<ctime>
using namespace std;
int main(){
    freopen("rand.txt","w",stdout);
    int a,b;
    srand(time(0));
    a=rand()%10+1;b=rand()%10+1;
    cout<<a+b;
}
View Code

This is a positive solution (assuming it is a positive solution!)

#include<iostream>
#include<cstdio>
#include<ctime>
using namespace std;
int main(){
    freopen("rand.txt","r",stdin);
    freopen("1.txt","w",stdout);
    int a,b;
    cin>>a>>b;
    cout<<a+b;
}
View Code

This is violence (assuming it is violence)

#include<iostream>
#include<cstdio>
#include<ctime>
using namespace std;
int main(){
    freopen("rand.txt","r",stdin);
    freopen("2.txt","w",stdout);
    int a,b;
    cin>>a>>b;
    cout<<a+b;
}
View Code

The final step is to shoot

#include<bits/stdc++.h>
using namespace std;
int main(){
    while(1){
        system("rand.exe");
        system("1.exe");
        system("2.exe");
        if(system("fc 1.txt 2.txt"));
        while(1);
    }
}
View Code

 

Guess you like

Origin www.cnblogs.com/Larry-Zero/p/11700499.html