Gym 102035H :Zuhair and the Dag

思路:由高位指向低位及一个闭环

#include <bits/stdc++.h>
using namespace std;
#define for1(i, n) for (int i = 1; i <= n; i++)
#define forn(i, n) for (int i = 0; i < n; i++)
#define IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main(){
    int n,m;
    scanf("%d%d",&n,&m);
    for1(i,m){
        int x,y;scanf("%d%d",&x,&y);
        if(x>y)printf("1");
        else printf("0");
    }
    printf("\n");
    return 0;
}

PS:

开IO读比不开就慢100ms;

 

 

posted @ 2019-03-29 22:08  AlexPanda  阅读(90)  评论(0编辑  收藏  举报