标签:简单 printf nbsp lse bsp print span amp 排序
http://poj.org/problem?id=3913
简单的排序
//3913 #include<stdio.h> bool Order(int a,int b,int c){ if((a<=b&&b<=c)||(a>=b&&b>=c)){ return true; } return false; } int main(){ int N,a[30],b[30],c[30]; int i,j,k; bool result[30]; i = 0; scanf("%d",&N); while(i<N){ scanf("%d %d %d",&a[i],&b[i],&c[i]); result[i] = Order(a[i],b[i],c[i]); i++; } printf("Gnomes:\n"); for(i=0;i<N;i++){ if(result[i]){ printf("Ordered\n"); } else{ printf("Unordered\n"); } } return 0; }
标签:简单 printf nbsp lse bsp print span amp 排序
原文地址:https://www.cnblogs.com/stevenzrx/p/11694660.html