UVa Problem
文章平均质量分 65
Ming-L
记忆、理解、应用、分析、评鉴、创造
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVa 10142 Australian Voting
#include #include #include char Candidates[20][80];int Votes[1000][20];void elect(int num,int voteNum){ int Eliminate[20]; int Count[20]; int left,allvotes; int i,j; int min,max; left = n原创 2014-04-14 15:56:06 · 500 阅读 · 0 评论 -
UVa 10315 Poker Hands
#include #define NCARDS 52#define NSUITS 4char Values[] = "23456789TJQKA";char Suits[] = "CDHS";#define HIGH_CARD 1#define PAIR 2#define TWO_PAIRS 3#define THREE_OF_A_KIND 4#define STRAIGHT原创 2014-04-24 15:20:25 · 536 阅读 · 0 评论 -
UVa 10258 Contest Scoreboard
#include #include #include typedef struct team{ int id; int ac; int time; int vis; int acid[11]; int penalty[11];} Team;int cmp(const void *a,const void *b){ Tea原创 2014-05-12 14:52:31 · 533 阅读 · 0 评论 -
UVa 10196 Check the Check
#include #include #include char ChessBoard[8][8];char *WhiteCheck = "white king is in check.";char *BlackCheck = "black king is in check.";char *NoCheck="no king is in check.";int boundary(int原创 2014-04-10 18:48:55 · 641 阅读 · 0 评论 -
UVa 10050 Hartals
#include int Days;int PoliticalNum;int Hartal[100];int countHartalsDays(){ int count = 0; int i,j; for(i=1;i<=Days;i++) { if(i%7==6 || i%7==0) continue; for(j=0;j<PoliticalNum;j++) {原创 2014-04-25 10:34:25 · 637 阅读 · 0 评论 -
UVa 100 The 3n + 1 problem
// [问题描述] // 考虑如下的序列生成算法:从整数 n 开始,如果 n 是偶数,把它除以 2;如果 n 是奇数,把它乘 3 加 // 1。用新得到的值重复上述步骤,直到 n = 1 时停止。例如,n = 22 时该算法生成的序列是: // // 22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1 // // 人们猜想(没有原创 2014-03-26 09:56:28 · 480 阅读 · 0 评论 -
UVa 10044 Erdos Numbers
#include #include #include #include #define MAXNAME 500#define MAX 5000#define INFINITY -1typedef int elemType;typedef struct node{ elemType data; struct node *next;} Node;typedef struct原创 2014-05-09 11:20:55 · 541 阅读 · 0 评论 -
UVa 10033 Interpreter
#include #include #include int Cache[1000];int Reg[10];int execute(){ int steps=0; int pc=0,ir=0; int a,b,c; while(ir!=100 && pc<1000) { ir = Cache[pc]; a = ir/100; b = (ir/10)%10;原创 2014-04-09 18:03:08 · 508 阅读 · 0 评论 -
UVa 10189 Minesweeper
#include int main(){ int i,j; int m,n; int field=0; char array[100][100]; int result[100][100]; int count=0; int row; int line; while(scanf("%d %d",&n,&m)){ if(m==0&&n==0) break; for(i=原创 2014-03-26 09:58:41 · 438 阅读 · 0 评论 -
UVa 10205 Stack 'em Up
#include #include #define CARDNUM 52char Values[13][10] = { "2","3","4","5","6","7","8","9","10","Jack","Queen","King","Ace"};char Suits[4][10] = {"Clubs","Diamonds","Hearts","Spades"};void di原创 2014-05-02 00:38:11 · 432 阅读 · 0 评论 -
UVa 10038 Jolly Jumpers
#include #include int Array[3000];int jolly(int length){ int i,temp; int filter[3000]={0}; for(i=0;i<length-1;i++) { temp = Array[i+1]-Array[i]; if(temp<0) temp = -temp; if(temp=length |原创 2014-04-16 14:33:32 · 402 阅读 · 0 评论 -
UVa 706 LC-Display
#include char NUMDISPLAY[5][10][4] = { " - ", " ", " - ", " - ", " ", " - ", " - ", " - ", " - ", " - ", "| |", " |", " |", " |", "| |", "| ", "| ", " |", "| |", "| |", "原创 2014-04-01 10:43:54 · 534 阅读 · 0 评论 -
UVa 10137 The Trip
#include double computeChange(double money[],int length){ double result,average,sum,changeDown,changeUp; int i; result = average = sum = changeDown = changeUp = 0.00; for(i=0; i<length; i++) s原创 2014-04-01 10:35:41 · 337 阅读 · 0 评论 -
UVa 843 Crypt Kicker
#include #include #include char Keys[1000][16];char Words[40][16];char Cipher[26];char Trys[26];int KeyNum;int WordNum;/*int compare(char* a, char* b){ return strlen(a) > strlen(b) ? 1原创 2014-04-29 22:45:13 · 801 阅读 · 0 评论 -
UVa 10267 Graphical Editor
#include #include #define MAXSIZE 251char IMAGE[MAXSIZE][MAXSIZE];void display(int m,int n){int i,j;for(i=1;i{for(j=1;j{printf("%c",IMAGE[i][j]);}printf("\n");}}void L(原创 2014-04-04 10:59:42 · 436 阅读 · 0 评论
分享