match

Contrasting shots are very useful in oi (I can only now...)

First let's make a data generator

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<ctime>
#include<vector>
#include<set>
#include<map>
#include<stack>
using namespace std;
int main()
{ srand(time(0));
      printf("%d %d",rand(), rand());
      return 0;
}
The range of random data we can obtain by statistics is [0,32767], which is obviously not possible for some data ranges, so we deduce a formula: For the integers of [a,b] , the generation method is int(double(rand())/32767*(ba))+a , and the decimal can be removed by int.

Then we're working on a beat matcher after we've made the data generator.

#include<windows.h>
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<ctime>
#include<vector>
#include<set>
#include<map>
#include<stack>
using namespace std;
int main()
{     int t=1000;
      while(t--){
          system("data > test.in");
          system("baoli < test.in > baoli.out");
          system("zj < test.in > zj.out");
          if(system("fc baoli.in zj.out"))break; t is arbitrary}      return 0;
      }


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324981941&siteId=291194637