(1.1.6)UVA 10978 Let's Play Magic!(直叙式模拟)
来源:互联网 发布:局域网斗地主软件 编辑:程序博客网 时间:2024/05/20 11:48
/* * UVA_10978.CPP * * Created on: 2013年10月6日 * Author: Administrator */#include <iostream>#include <cstdio>#include <cstring>using namespace std;int main(){char card[55][55],word[55][55],*order[55];int n;while(scanf("%d",&n)!=EOF,n){int i,j,k;for(i = 0 ; i < n ; ++i){order[i] = "?";}for(i = 0 ; i < n ; ++i){scanf("%s %s",&card[i],&word[i]);}for(i = 0,j = 0 ; i < n ; ++i){for(k = strlen(word[i]) ; ; j = (j + 1)%n ){if(order[j] == "?" && --k <= 0){break;}}order[j] = card[i];}for(i = 0 ; i < n ; ++i){printf(i < n - 1 ?"%s ":"%s\n",order[i],order[i] );}}}
- (1.1.6)UVA 10978 Let's Play Magic!(直叙式模拟)
- Let's go to play (模拟)
- UVa10978 - Let's Play Magic!(扑克类的游戏)
- hdoj--Let's go to play(模拟)
- Let’s Play Games!
- let‘s play game!
- 2204 let's play dota.
- Let's play a game
- Let's go to play
- codeforces 235B - Let's Play Osu!
- codefrces 235B Let's Play Osu!
- zoj2507 Let's play a game
- CF235 Let's Play Osu![dp+概率]
- Codeforces 235B. Let's Play Osu!
- Sicily 1905. Let’s play UNO
- Codeforces 235B Let's Play Osu!
- zoj 2507 Let's play a game
- 杭电 Let's go to play
- 查看、修改oracle字符集,查看oracle版本
- log4j配置说明
- C专家编程--指针和数组(四) 指针对数组的访问
- 会话跟踪技术
- sql nvarchar为null问题
- (1.1.6)UVA 10978 Let's Play Magic!(直叙式模拟)
- dm368ipnc 重写架构中的swosd 实现中文osd
- CRC5的verilog实现(X5+X2+X0)
- GitHub fork他人repo并最终要求合并到原repo的过称(外加分支使用)
- 路遥《平凡的世界》读后感
- JS之DOM
- (转载)尚学堂Linux笔记
- Integer类中parseInt与valueOf两个方法的区别
- 操作系统拾遗之进程和线程