Link Problem: http://uva.onlinejudge.org/external/102/10205.pdf
Click on table to read problem, udebug, discuss!
Last Submissions | ||||||
---|---|---|---|---|---|---|
Problem | Verdict | Lang | Time | Best | Rank | Submit Time |
| discuss10205 - | Accepted | C++11 | 0.000 | 0.000 | 1294 | 4 mins ago |
#include<bits/stdc++.h>
using namespace std;
int t, n, k;
int a[1001][1001];
string val[13] = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"};
string suit[4] = {"Clubs", "Diamonds", "Hearts", "Spades"};
string s;
int main(){
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
cin >> t;
while(t--){
cin >> n;
for(int i=1; i<=n; i++)
for(int j=1; j<=52; j++)
cin >> a[i][j];
vector<string> as;
as.push_back("code by ncc02");
for(int i=0; i<4; i++)
for(int j=0; j<13; j++)
as.push_back(val[j] + " of " + suit[i]);
cin.ignore();
while(getline(cin, s) && s.size()){
k= stoi(s);
vector<string> t= as;
for(int j=1; j<=52; j++)
as[j]= t[ a[k][j] ];
}
for(int j=1; j<=52; j++)
cout<<as[j]<<"\n";
cout<<(t?"\n":"");
}
}