uva 10420

#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>char temp[1000], input[1000];char word[5000][1000];void change( int i, int j ){char temp[1000];strcpy( temp, word[i] );strcpy( word[i], word[j]

我的vimrc設定檔

runtime! debian.vim"設定編碼set encoding=utf-8set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936set fileencodings=utf-8,ucs-bom,chinese"語言設定set langmenu=zh_CN.UTF-8set nu"設定文法高亮syntax enablesyntax on"設定色彩配置colorscheme torte"可以在buffer的任何地方使用滑鼠set

UVA 532

/* 三維map上的 搜尋, BFS水過*/#include <stdio.h>#include <string.h>#include <stdlib.h>int map[100][100][100];int vis[100][100][100];int dis[100][100][100];int h, m, n;int d[6][3] = {{-1,0,0}, {1,0,0},{0,1,0},{0,-1,0},{0,0,1},{0,0,-1}

UVA 146

/*很鬱悶為什麼這麼水的字母串+O(n2)排序為什麼是暴力搜尋這章節的,好吧,不管三七二十一先過了水題*/#include <stdio.h>#include <string.h>#include <stdlib.h>char str[200];int len;void insert( int j, int i ){int t, temp;temp = str[i];for( t = i-1; t >= j; t-- )str[t+1] = str[t]

UVA 10098

/*注意全排列中有重複的如 aac的全排列為aacacacaa*/ #include <stdio.h>#include <string.h>#include <stdlib.h>#define MAX 100int len, flag;char str[MAX];char num[MAX];int used[MAX];void dfs( int x ){int i;if( x == len ){for( i = 0; i < len; i++

UVA 10258 Contest Scoreboard

                練習賽做的題目。1小時12分鐘才AC,WA了2次。這種一看就有思路的題目,應該在半小時內做出來的。第一次數組開到100,小了,第二次輸入沒有控制好,兩個測試範例之間是一個空格,如果用scanf("%d%d%d %c)!=EOF的話就把所有的範例一起讀入判斷了.#include<cstdio>#include<cstring>#include<cstdlib>#include<iostream>using

new 和 override比較

 問題: c#中new和override的區別 問題補充:例如: A類 有方法 public virtual void test() B類繼承自A類,有方法 public new void test() 如下執行個體化: A a = new B(); a.test(); 會調用哪個類中的TEST方法? 答案: 如果你用override,則無論調用的是A類還是B類中的TEST(),系統都會找到它實質類的TEST(); 如果是用的New,則可以通過類型轉換調用到基類的TEST();

白盒測試方法之邏輯覆蓋法

 邏輯覆蓋測試:是通過對程式邏輯結構的遍曆實現程式的覆蓋。從覆蓋原始碼的不同程度可以分為以下六個標準:語句覆蓋、判定覆蓋(又稱為分支覆蓋)、條件覆蓋、判定-條件覆蓋(又稱為分支-條件覆蓋)、條件組合覆蓋和路徑覆蓋。       先看一下具體例子的原始碼(C語言):/*  *  白盒測試邏輯覆蓋測試範例  *  作者:胡添發(hutianfa@126.com)  */ int logicExample(int x, int y) {     int magic=0;     if(x>0 &

UVA 442

/*這題思路簡單,寫起來有點小麻煩,建議用函數寫,如有疑問,歡迎留言*/#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>int p[200][200], top, flag, sum;char stack[200];char str[2000];typedef struct matrix{char n;int row, col;}M;int mul(

UVA 10305

/*簡單的拓撲排序*/#include <stdio.h>#include <stdlib.h>#include <string.h>#define M 200int t, n, m, data[M][M];int topo[M], c[M], data[M][M];int dfs( int u ){ int v; c[u] = -1; for( v = 1; v <= n; v++ ) if( data[u][v] )

UVA 340

/*大水水一個*/#include <stdio.h>#include <string.h>#define MAX 1010int main(){ int N, A, B, used_s[MAX],used_g[MAX], s[MAX], g[MAX], cout = 0, i, j; while( scanf( "%d", &N ) && N ) { for( i = 1; i <= N; i++ )

dijkstra O(n2) 演算法模版

#include <iostream>#include <memory>using namespace std;const int maxint = 9999999;const int maxn = 1010;int data[maxn][maxn], lowcost[maxn];//data 存放點點之間的距離, lowcost存放點到start 的距離,從0開始存放bool used[maxn]; //標記點是否被選中int n;//頂點的個數 void

UVA 10054

/*歐拉迴路*//*這到題UVA 雖然AC但是因為 給的資料有點弱,其實還有種情況:需要判斷一是否是一個連通圖,比如說如果最好串成了2條項鏈,而不能穿成一條,就應該輸出不存在*///判斷聯通可以在最後輸出前掃一下,很簡單我就不寫了#include <stdio.h>#include <string.h>int map[200][200], vis[200][200];int num[100];typedef struct{ int u, v;}p;p stack[1

UVA 10474

//很水的題,我看時間3秒,資料10000以內,就直接冒泡排序,然後一個尋找就OK了,發現uva的水體最大難度在與題目英文超長,每次讀題都很痛苦,好吧,我只好用這個了//http://www.nocow.cn #include <stdio.h>#include <string.h>int main(){ int n, m, a[10010], b[10010], i, j, cout = 1, flag, temp; while( scanf(

uva 748 浮點乘法冪

#include <stdio.h>#include <math.h>#include <stdlib.h>#include <string.h>#define MAX 20000int main(){int n, p, i, j, k, x, carrey;int num[MAX], num1[MAX], num2[MAX];char R[7];while( scanf( "%s %d", R, &n ) == 2 ){memset(

UVA 10167

#include <stdio.h>#include <math.h>#include <stdlib.h>#define MAX 200typedef struct cherry{int x, y;}C;int N;C ch[MAX];int cal( int A, int B ){int time, x, y;x = y = 0;for( time = 0; time < 2*N; time++ ){if( (ch[time].x * A + ch[

UVA 10106

//繼續水一個大數字乘法,絕對的模板題........#include <stdio.h>#include <string.h>#define MAX_LEN 400int main(){ int i, j; int len1, len2; int a[MAX_LEN+10], b[MAX_LEN+10], c[MAX_LEN*2+10]; char str1[MAX_LEN+10], str2[MAX_LEN+10]; while(

UVA 439

#include <stdio.h>#include <string.h>#include <stdlib.h>int d[8][2]={{1,2},{2,1},{-1,2},{-1,-2},{1,-2},{-2,-1},{-2,1},{2,-1}};int q[100];int dis[10][10];int vis[10][10];void bfs( int x, int y ){int front, rear, nx, ny, u, i, v;u =

UVA 465

#include<stdio.h>#include<stdlib.h>#define MAX_INT 2147483647char num1[300],num2[300];int main(){ char c; while (scanf("%s %c %s", num1, &c, num2)==3) { printf("%s %c %s\n", num1, c, num2); double a, b;

二叉樹遞迴建立–深搜+寬搜遍曆

/*輸入檔案自己建立*/#include <stdio.h>#include <string.h>#include <stdlib.h>#define max 100int x;char ans[max];typedef struct Tree{char val;struct Tree* pl;struct Tree* pr;}*T;T createtree( T p ){char ch;scanf( "%c", &ch );if( ch == '#'

總頁數: 61357 1 .... 15183 15184 15185 15186 15187 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.