标签:style http color os io ar for 数据 div
2 1 2 3 4 5 6 7 Friday 1 4 3 5 6 8 10 Sunday
5 10
代码:
#include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int main() { char d[10]; int T,i,a[7]; scanf("%d",&T); getchar(); while(T--) { for(i=0;i<7;++i) { scanf("%d",&a[i]); } sort(a,a+7); scanf("%s",d); if(!strcmp(d,"Monday")) printf("%d\n",a[0]); else if(!strcmp(d,"Tuesday")) printf("%d\n",a[1]); else if(!strcmp(d,"Wednesday")) printf("%d\n",a[2]); else if(!strcmp(d,"Thursday")) printf("%d\n",a[3]); else if(!strcmp(d,"Friday")) printf("%d\n",a[4]); else if(!strcmp(d,"Saturday")) printf("%d\n",a[5]); else if(!strcmp(d,"Sunday")) printf("%d\n",a[6]); } return 0; }
标签:style http color os io ar for 数据 div
原文地址:http://blog.csdn.net/qq_18062811/article/details/38896305