Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - INT 1
Search - INT 1 - List
#include #include #include #define N 20 int aa[N][N]; int yes=0; int x[100][2],n=0; void fun1(int (*aa)[N],int (*a)[N]); int fun(int (*a)[N],int i,int j); void begain(int (*t)[N]); void pr(int (*t)[N],int nn); void win(int (*t)[N]); void lose(); void main(void) { int t[N][N]; begain(t); pr(t,0); fun(t,1,1); if(yes) win(t); else lose(); getch(); } void fun1(int (*aa)[N],int (*a)[N]) { int i,j; for(i=0;i<N;i++) for(j=0;j<N;j++) aa[i][j]=a[i][j]; } int fun(int (*a)[N],int i,int j) { if(i==N-2&&j==N-2) { yes=1; return; } a[i][j]=1; fun1(aa,a); if(aa[i+1][j+1]==0&&!yes) { fun(aa,i+1,j+1); if(yes) {x[n][0]=i,x[n++][1]=j;return;} } fun1(aa,a); if(aa[i+1][j]==0&&!yes) { fun(aa,i+1,j); if(yes) {x[n][0]=i,x[n++][1]=j;return;} } fun1(aa,a); if(aa[i][j+1]==0&&!yes) { fun(aa,i,j+1); if(yes) {x[n][0]=i,x[n++][1]=j;return;} } fun1(aa,a); if(aa[i-1][j]==0&&!yes) { fun(aa,i-1,j); if(yes) {x[n][0]=i,x[n++][1]=j;return;} } fun1(aa,a); if(aa[i-1][j+1]==0&&!yes) { fun(aa,i-1,j+1); if(yes) {x[n][0]=i,x[n++][1]=j;return;} } fun1(aa,a); if(aa[i+1][j-1]==0&&!yes) { fun(aa,i+1,j-1); if(yes) {x[n][0]=i,x[n++][1]=j;return;} } fun1(aa,a); if(aa[i][j-1]==0&&!yes) { fun(aa,i,j-1); if(yes) {x[n][0]=i,x[n++][1]=j;return;} } fun1(aa,a); if(aa[i-1][j-1]==0&&!yes) { fun(aa,i-1,j-1); if(yes) {x[n][0]=i,x[n++][1]=j;return;} } } void begain(int (*t)[N]) { int i,j; system(cls); randomize(); for(i=0;i<N;i++) { for(j=0;j<N;j++) { if(i==0||i==N-1||j==0||j==N-1) t[i][j]=1; else if(i==1&&j==1||i==N-2&&j==N-2) t[i][j]=0; else t[i][j]=random(2); } } } void pr(int (*t)[N],int nn) { int i,j,ii; textcolor(RED); gotoxy(1,1); for(i=0;i<N;i++) { for(j=0;j<N;j++) { if(nn!=1) printf(%2d,t[i][j]); else { for(ii=0;ii<n;ii++) { if(x[ii][0]==i&&x[ii][1]==j) { cprintf(%2d,t[i][j]); break; } } if(ii<n) continue; if(i==N-2&&j==N-2) cprintf( 0); else printf(%2d,t[i][j]); } } printf(\n); } } void win(int (*t)[N]) { int i,j,ii,jj; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(x[j][0]==x[i][0]&&x[j][1]==x[i][1]) { for(jj=j,ii=i;jj=0;i--) printf(%3d%3d->,x[i][0],x[i][1]); printf(%3d%3d\n,N-2,N-2); t[1][1]=0; pr(t,1); } void lose() { printf(\nNot find way!\n); }
Date : 2011-12-19 Size : 854byte User : 461600486@qq.com

DL : 0
int *base int *top int stacksize }sqstack inistack(sqstack &s) { s.base=(int*)malloc(stackintsize*sizeof(int)) if(!s.base) exit(-2) s.top=s.base s.stacksize=stackintsize return 1 }- int*base int*top int stacksize }sqstack inistack(sqstack s) { s.base=(int*)malloc(stackintsize*sizeof(int)) if(!s.base) exit(-2) s.top=s.base s.stacksize=stackintsize return 1 }
Date : 2026-01-07 Size : 3kb User : 王键

[基本要求] 一个完整的系统应具有以下功能: (1)I:初始化(Initialization)。从终端读入字符集大小n,以及n个字符和n个权值,建立哈夫曼树,并将它存于文件hfmTree中。 (2)E:编码(Encoding)。利用已建好的哈夫曼树(如不在内存,则从文件hfmTree中读入),对文件ToBeTran中的正文进行编码,然后将结果存入文件CodeFile中。 (3)D:译码(Decoding)。利用已建好的哈夫曼树将文件CodeFile中的代码进行译码,结果存入文件TextFile中。 (4)P:印代码文件(Print)。将文件CodeFile以紧凑格式显示在终端上,每行50个代码。同时将此字符形式的编码文件写入文件CodePrin中。 (5)T:印哈夫曼树(Tree printing)。将已在内存中的哈夫曼树以直观的方式(树或凹入表形式)显示在终端上,同时将此字符形式的哈夫曼树写入文件TreePrint中。 [测试数据] (1)利用下面这道题中的数据调试程序。 某系统在通信联络中只可能出现八种字符,其概率分别为0.25,0.29,0.07,0.08,0.14,0.23,0.03,0.11,试设计哈夫曼编码。 (2)用下表给出的字符集和频度的实际统计数据建立哈夫曼树,并实现以下报文的编码和译码:“THIS PROGRAM IS MY FAVORITE”。-[basic requirements] a complete system should have the following functions : (a) I : initialization (Initialization). Reading from the terminal into the HKSCS size n, and n n characters and the right value, the establishment of Huffman tree. it will be stored in documents hfmTree China. (2) E : coding (Encoding). Use has completed the Huffman tree (if not memory, from hfmTree document reads), the document ToBeTran the encoded text, and then the results were CodeFile posting documents. (3) D : Decoding (Decoding). The use of the completed document will Huffman tree CodeFile the code decoding, results were deposited documents TextFile. (4) P : India source document (Print). CodeFile of documents to compact format in the end, every line 50 code. While this form of characters encoded files int
Date : 2026-01-07 Size : 990kb User : 吕夏琴

DL : 0
编写一个控制台应用程序,完成下列功能,并写出运行程序后输出的结果。 1) 创建一个类A,在A中编写一个可以被重写的带int类型参数的方法MyMethod, 并在该方法中输出传递的整型值加10后的结果。 2) 再创建一个类B,使其继承自类A,然后重写A中的MyMethod方法,将A中接 收的整型值加50,并输出结果。 3) 在Main方法中分别创建类A和类B的对象,并分别调用MyMethod方法 -Write a console application, complete the following functions, and write the output after running the program results. 1) create a category A, in A in the preparation of a can be rewritten with int type parameters MyMethod, and in the methods of transmission of the output value of 10 after cosmetic surgery results. 2) re-creation of a category B, so that it inherited from the category A, and then rewrite A in MyMethod method to receive the integer A value of plus 50, and output results. 3), respectively, in the Main method to create category A and category B of the object, and call respectively MyMethod method
Date : 2026-01-07 Size : 10kb User :

DL : 0
一本书的页码从自然数1开始顺序编码直到自然数n。书的页码按照通常的习惯编排,每个页码都不含多于的数字0,例如,第6页用数字6表示,而不是06或者006等。现在需要编写一个方法int[] CaculateNumber(int n),给它一个书的总页码n,方法能有个返回值,它记录了在给定的页码n中0,1,2….9数字出现的次数(如页码67表示6和7各出现了一次)。数组一共九个元素,0出现的次数记录在数组索引为0的元素中,依次类推。-A book page from the natural number 1 until the beginning of coding sequence of natural number n. Book page number in accordance with the usual habit of scheduling, each page does not contain more than the figures are 0, for example, p. 6 in figures 6 that, rather than 06 or 006 and so on. Now need to prepare a method int [] CaculateNumber (int n), to give it a book s total page number n, can have a return value, it records the page number in a given n in the figures 0,1,2 ... .9 number (such as page 67 that the emergence of 6 and 7 a). A total of nine elements in the array, 0 the number of records appears in the array index of the element to 0, and so on.
Date : 2026-01-07 Size : 12kb User :

这个用c#编写的展品统计软件,实现了读取串口数据,将数据统计成展品关注度信息并显示,同时附带串口设置的相关界面。-This statistical software with c# is used to statistical the exhibits int the way recieving from a read serial data into display data and show concern about the degree of information, and the related spin-off serial interface settings.
Date : 2026-01-07 Size : 48kb User : jerry.shen

C#写得标准压缩解压缩小程序 .Net中函数声明: public static extern int MyZip_AddFile(String SrcFile,String ZipFile) public static extern int MyZip_AddDirectory(String SrcPath,String ZipFile) public static extern int MyZip_ExtractFileAll(String ZipFile,String PathName) public static extern int MyZip_ExtractFile(String ZipFile,String srcName,String DstName) -C# written standard procedures to reduce compression decompression. Net in the function declaration: public static extern int MyZip_AddFile (String SrcFile, String ZipFile) public static extern int MyZip_AddDirectory (String SrcPath, String ZipFile) public static extern int MyZip_ExtractFileAll (String ZipFile, String PathName) public static extern int MyZip_ExtractFile (String ZipFile, String srcName, String DstName)
Date : 2026-01-07 Size : 252kb User : 一心一意

DL : 0
编写程序通过设置ios::scientific和ios::fixed标志以定点和科学计数法显示浮点类型数据。 测试: #include <iostream> using namespace std int main() { double x = .001234567, y = 1.886e9 //… return 0 } -Write a program by setting the ios:: scientific and ios:: fixed flag with fixed-point and scientific notation floating-point type data display. Test:# include <iostream> using namespace std int main () (double x = .001234567, y = 1.886e9 // ... return 0 )
Date : 2026-01-07 Size : 1.36mb User : Cheng

DL : 0
设计一个栈,要求如下: 1、使用模版技术实现,要求该栈内能存储各种数据类型如int、char、string以及自定义类型 2、设计一个基类,基类定义栈的所有接口,子类来具体实现 3、每个子类使用不同类型的容器来组织底层数据-Design a stack requirements are as follows: 1, using template technology, requires that the stack can store various data types such as int, char, string, and custom type 2, the design of a base class, base class defines all of the interface stack, sub- concrete realization of class 3, each sub-class of different types of containers used to organize the underlying data
Date : 2026-01-07 Size : 1.01mb User : ychy

DL : 0
建立一个int类型的长度为n的vector数组,n由用户从键盘输入, 输入元素到数组,输出数组中的元素,用vector建立元素为10的类型为Point的对象数组,要求 建立数组时有默认的初始化,每个元素的X,Y的值为0. 调用Move成员函数改变每个元素的X,Y的值,输出元素-Establish a int type of length is n vector array, n by the user input from the keyboard, input elements to an array, the output of the elements in an array, with vector set up for the type of elements for the 10 Point object arrays, and requirements Build array is the default initialization, each element of the X, Y value is 0. Call Move member function change each element of the X and Y values, output elements
Date : 2026-01-07 Size : 924kb User :

在字符串数组中搜索选定的词组,作为程序员收藏的资料,有利于提高编程效率!-#ifdef _AFXDLL Enable3dControls() // Call this when using MFC in a shared DLL #else Enable3dControlsStatic() // Call this when linking to MFC statically #endif CStringArraySearchDlg dlg m_pMainWnd = &dlg int nResponse = dlg.DoModal() if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application s message pump. return FALSE }
Date : 2026-01-07 Size : 1.79mb User : 小王

DL : 0
用指定的符号分割字符串,可以作为程序的资料,提高编程效率!-void CDivStringDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this) // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0) // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON) int cyIcon = GetSystemMetrics(SM_CYICON) CRect rect GetClientRect(&rect) int x = (rect.Width()- cxIcon+ 1)/2 int y = (rect.Height()- cyIcon+ 1)/2 // Draw the icon dc.DrawIcon(x, y, m_hIcon) } else { CDialog::OnPaint() } }
Date : 2026-01-07 Size : 1.78mb User : 小王

DL : 0
对于单声道声音文件,采样数据为八位的短整数(short int 00H-FFH);而对于双声道立体声声音文件,每次采样数据为一个16位的整数(int),高八位和低八位分别代表左右两个声道。-itn an asl asnf aj la lanla
Date : 2026-01-07 Size : 839kb User : 曹预建

重载运算符 求100的阶乘 求超过int范围的大整数-huge number
Date : 2026-01-07 Size : 612kb User : puppyandbunny

DL : 0
以前自己编的c++的宿舍管理系统,可以实现添加楼层,寝室信息和楼长,寝室长,学生,保洁员等信息,实现查询,添加和删除功能,还有的就不记得了,可以自己看一下-#include<iostream> #include<string> #include<string> #include<fstream> using namespace std class DomitoryAdmin { struct DomitoryInfm //宿舍楼信息 { string sushelouNumber int finish_time string sex } struct LayerInfm //楼层信息 { string sushelouNumber1 int loucengNumber int roomNumbers } struct Student //学生信息 { string name int xuehao } struct RoomInfm //房间信息 { int roomNumber int bedNumbers Student studentInfm } struct LouMonitor //楼长信息 { string mo_name int age string postion } private: DomitoryInfm domitoryInfm LayerInfm layerInfm RoomInfm roomInfm LouMonitor LouMonitor public: void addDomitoryInfm() void addLayerInfm() void addRoomInfm() void addLouMonitor() void searchDomitoryInfm() void searchLayerInfm() void searchRoomInfm() void searchLouMonitor() void searchRoo
Date : 2026-01-07 Size : 1.75mb User : 安若

整型转字符串数组,郭晓璐开发,赵树新辅导,功能很强大-int to string
Date : 2026-01-07 Size : 294kb User : 让我去火星

DL : 0
编写一个void sort(int *x,int n)实现将x数组中的n个数据从大到小 排序。n及数组元素在主函数中输入。将结果显示在屏幕上并输出到文件p9_1.out中 -Write a void sort (int* x, int n) to achieve the x n array data in descending order. n and array elements entered in the main function. The results are displayed on the screen and the output to a file p9_1.out
Date : 2026-01-07 Size : 1kb User : 王鹏

DL : 0
定义类型为char, short, int, long, float, double, char *, int *, double *的变量各一个,给每个变量设定或输入值-The definition of type char, short, int, long, float, double, char*, int*, double* variables for each one, to set or enter a value for each variable
Date : 2026-01-07 Size : 14kb User : 邹威

DL : 0
定义一个长度为10的int数组nArr,采用给定初始值或从键盘输入的方式给数组的10个元素赋值;定义一个int *型指针变量pInt,并将nArr的首地址存入pInt中;-Define a length int array nArr 10, using methods given initial value or input from the keyboard to the 10-element array assignment define a pointer variable of type int* pInt, and store nArr first address pInt in
Date : 2026-01-07 Size : 10kb User : 邹威

大学生课程设计用,C语言课程设计 包含int Search() /*查询函数*/ void Output_single_data(int x) /*输出学生信息*/ void Insert() /*录入函数*/ void Modify() /*修改函数*/ void Delete() /*删除函数*/ int Add() /*添加函数*/ void Select() /*选择函数*/ void Sort_by_average() /*按平均分输出*/ void The_failed_students() /*输出不及格学生*/ void Display() /*输出函数*/ int _tmain(int argc, _TCHAR* argv[]) /*主函数*/
Date : 2014-12-09 Size : 9.07kb User : 1993lychristina@gmai.com
« 12 3 4 5 6 »
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.