(咕咕咕,咕了快一年的bu题。。

A.CCPC直播

传送:http://acm.hdu.edu.cn/showproblem.php?pid=6297

题意:rt。

分析:模拟。

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 int main(){
 4     int t; scanf("%d",&t);
 5     while (t--){
 6         int pro,num; string rank,name,now;
 7         cin >> rank;
 8         cin >> name; 
 9         cin >> pro;
10         cin >> now;
11         if (now=="Running") cin >> num;
12         for (int i=0;i<3-rank.size();i++) cout << " ";
13         cout << rank << "|";
14         cout << name;
15         for (int i=0;i<16-name.size();i++) cout << " ";
16         cout << "|";
17         cout << pro << "|[";
18         if (now=="Running"){
19             for (int i=0;i<num;i++) cout << "X";
20             for (int i=0;i<10-num;i++) cout << " "; 
21         }
22         else{
23             for (int i=0;i<4;i++) cout << " ";
24             if (now=="FB"){
25                 cout << "AC*";
26                 for (int i=0;i<3;i++) cout << " ";
27             }
28             else{
29                 cout << now;
30                 for (int i=0;i<10-now.size()-4;i++) cout << " ";
31             }
32         }
33         cout << "]\n";
34     }    
35     return 0;
36 }
P6297

相关文章: