精华内容
下载资源
问答
  • ZJOI2008 杀蚂蚁 WA代码

    2015-09-30 17:33:59
    ZJOI2008 杀蚂蚁 WA 代码
  • hdu2102(WA代码)

    2012-09-16 20:17:40
    #include"stdio.h" #include"string.h" #include"queue" using namespace std; int n,m,limit; int map[2][13][13]; int flag[2][13][13];...int dir[4][2]={1,0, -1,0, 0,1, 0,-1};...int f_e,x_e,y_
    #include"stdio.h"
    #include"string.h"
    #include"queue"
    using namespace std;
    
    int n,m,limit;
    int map[2][13][13];
    int flag[2][13][13];
    int dir[4][2]={1,0, -1,0, 0,1, 0,-1};
    int f_s,x_s,y_s;
    int f_e,x_e,y_e;
    struct node
    {
        int f;
        int x,y;
        int step;
    };
    
    int Judge(int f,int x,int y)
    {
        if(x<0 || x>=n || y<0 || y>=m)	return -1;
        if(map[f][x][y]==-1)			return -1;
        if(flag[f][x][y])				return -1;
        return map[f][x][y];
    }
    int BFS()
    {
        queue<node>q;
        node cur,next;
        int i;
        int t,f_t;
    
        memset(flag,0,sizeof(flag));
        cur.f=f_s;
        cur.x=x_s;
        cur.y=y_s;
        cur.step=0;
        flag[cur.f][cur.x][cur.y]=1;
        q.push(cur);
    
        while(!q.empty())
        {
            cur=q.front();
            q.pop();
    
            if(cur.step>limit)    break;
            if(cur.f==f_e && cur.x==x_e && cur.y==y_e)    return cur.step;
    
            for(i=0;i<4;i++)
            {
                next.x=cur.x+dir[i][0];
                next.y=cur.y+dir[i][1];
    
                t=Judge(cur.f,next.x,next.y);
                if(t==-1)    continue;
                if(t==0)
                {
                    next.f=cur.f;
                    next.step=cur.step+1;
                    q.push(next);
                    flag[next.f][next.x][next.y]=1;
                }
                else if(t==1)
                {
                    next.f=cur.f;
                    next.step=cur.step+1;
                    q.push(next);
                    flag[next.f][next.x][next.y]=1;
    
                    if(cur.f==0)    f_t=1;
                    else            f_t=0;
                    if(Judge(f_t,next.x,next.y)==0)
                    {
                        next.f=f_t;
                        next.step=cur.step+1;
                        q.push(next);
                        flag[next.f][next.x][next.y]=1;
                    }
                }
            }
        }
    
        return -1;
    }
    
    int main()
    {
        int T;
        int f,i,l;
        int ans;
        char str[22];
        scanf("%d",&T);
        while(T--)
        {
            scanf("%d%d%d",&n,&m,&limit);
            for(f=0;f<2;f++)
            {
                for(i=0;i<n;i++)
                {
                    scanf("%s",str);
                    for(l=0;str[l];l++)
                    {
                        if(str[l]=='S')		{f_s=f;x_s=i;y_s=l;}
                        else if(str[l]=='P'){f_e=f;x_e=i;y_e=l;}
    
    
                        if(str[l]=='S')		map[f][i][l]=0;
                        else if(str[l]=='P')map[f][i][l]=0;
                        else if(str[l]=='.')map[f][i][l]=0;
                        else if(str[l]=='#')map[f][i][l]=1;
                        else if(str[l]=='*')map[f][i][l]=-1;
                    }
                }
            }
            for(i=0;i<n;i++)
            {
                for(l=0;l<m;l++)
                {
                    if(map[0][i][l]==1 && map[1][i][l]==1)			map[0][i][l]=map[1][i][l]=-1;
                    else if(map[0][i][l]==1 && map[1][i][l]==-1)	map[0][i][l]=map[1][i][l]=-1;
                    else if(map[0][i][l]==-1 && map[1][i][l]==1)	map[0][i][l]=map[1][i][l]=-1;
                }
            }
    
            ans=BFS();
            if(ans==-1 || ans>limit)	printf("NO\n");
            else						printf("YES\n");
        }
        return 0;
    }


    展开全文
  • The Problem Yertle has determined that the number of objects he can see, and hence rule, depends on the height of his throne. Your task, as

    The Problem

    Yertle has determined that the number of objects he can see, and hence rule, depends on the height of his throne. Your task, as Minister of Computing and Vertigo (a new combined Super Ministry), is to determine which objects Yertle would see should he build his throne to a particular height.

    Standard input consists of several test cases, each containing:

    • A floating point number on a line by itself, specifying the diameter of Yertle's planet in "flipper lengths".
    • A line containing three floating point numbers: the height of Yertle's throne (in flipper lengths), the latitude of Yertle's throne (between -90 and +90 degrees), the longitude of Yertle's throne (between 0 and 360 degrees).
    • An integer n on a line by itself, specifying the number of objects on the surface of Yertle's planet.
    • n more lines, each containing three floating point numbers and a string of alphabetic and space characters. Each line indicates the height, latitude, longitude and name of an object on the surface of Yertle's planet.

    All distances are in flipper lengths, and all latitudes and longitudes are in degrees. Floating point values are formatted as a string of decimal digits with an optional decimal point and sign. The fields in the input are separated by exactly one space character. You may assume that no object hides another; only the horizon limits Yertle's view.

    For each test case, standard output consists of:

    • The list of objects whose tops are visible to Yertle, in alphabetical order, followed by a blank line.

    Sample Input

    20000.0
    100.0 45.0 100.0
    3
    2.0 46.0 99.0 Cat
    20.0 -45.0 260.0 House
    5.0 45.1 100.2 Blueberry Bush
    6.0
    3.0 90.0 0.0
    2
    0.0 30.00 0.0 Ant on the horizon
    0.1 30.00 0.0 Cat on the horizon
    

    Sample Output

    Blueberry Bush
    Cat
    
    Cat on the horizon
    
    

     

     

     //题意 在一个半径为r的星球上, 站着一个高度为h的人, 星球上还有其它东西,阿猫阿狗之类的,它们也有自己的高度,还知道人和这些东西的经纬度, 问你这人能看到哪些东西,将它们的名称按字母排序后输出。

    #include <iostream>
    #include <cmath>
    #include <cstring>
    #include<cstdio>
    #include<algorithm>
    #include<map>
    using namespace std;
    map <string, int>::iterator it;
    const int maxn=10005;
    const double Pi=acos(-1.0);
    const double EP=1e-8;
    double r;
    struct Node{
        double lat, lng, h;
    }node[maxn];
    struct Point{double x, y;}man, p, c;
    struct Line{double a, b, c;}l1;
    Line makeline(Point p1, Point p2){
        Line t1;
        int sign=1;
        t1.a=p2.y-p1.y;
        if(t1.a<0){
            t1.a*=-1;
            sign=-1;
        }
        t1.b=sign*(p1.x-p2.x);
        t1.c=sign*(p1.y*p2.x-p1.x*p2.y);
        return t1;
    }
    double dist(Point a, Point b){
        return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
    }
    double max(double a, double b){
        return a>b?a:b;
    }
    double min(double a, double b){
        return a<b?a:b;
    }
    bool between(Point op, Point sp, Point ep){
        if(op.x<=max(sp.x,ep.x)&&op.x>=min(sp.x,ep.x)&&op.y<=max(sp.y,ep.y)&&op.y>=min(sp.y,ep.y))
        return true;
        return false;
    }

    double line_dist(double lng1,double lat1,double lng2,double lat2)//求球面上两点的距离
    {
           double dlng=fabs(lng1-lng2)*Pi/180;
           while (dlng>=Pi+Pi)
           dlng-=(Pi+Pi);
           if (dlng>Pi)
           dlng=Pi+Pi-dlng;
           lat1*=Pi/180,lat2*=Pi/180;
           return r*acos(cos(lat1)*cos(lat2)*cos(dlng)+sin(lat1)*sin(lat2));;
    }
    Point vert_p(Point p1, Line l1){
        Point p2;
        p2.x=(l1.b*(l1.b*p1.x-l1.a*p1.y)-l1.a*l1.c)/(l1.a*l1.a+l1.b*l1.b);
        p2.y=(l1.a*(l1.a*p1.y-l1.b*p1.x)-l1.b*l1.c)/(l1.a*l1.a+l1.b*l1.b);
        return p2;
    }

    int main(){
        //freopen("1.txt", "r", stdin);
        int n, i, sum;
        double d, angle, d1, d2;
        char s[maxn][80];
        man.x=0;c.x=0;c.y=0;
        while(scanf("%lf", &r)!=EOF){
            map <string, int> mp;
            sum=0;r/=2;
            scanf("%lf%lf%lf", &node[0].h, &node[0].lat, &node[0].lng);
            man.y=r+node[0].h;
            scanf("%d", &n);
            for(i=1; i<=n; i++){
                scanf("%lf%lf%lf ", &node[i].h, &node[i].lat, &node[i].lng);
                gets(s[i]);
                d=line_dist(node[0].lng-180, node[0].lat, node[i].lng-180, node[i].lat);
                angle=d/r;
                p.x=(r+node[i].h)*sin(angle);
                p.y=(r+node[i].h)*cos(angle);
                l1=makeline(p, man);
                Point t=vert_p(c, l1);
                d1=dist(c, t);
                d2==min(dist(c, man), dist(c, p));
                //if(fabs(node[i].h)<EP)continue;
                if(between(t, man, p))
                    d=d1;
                else
                    d=d2;
                if(fabs(d1-d2)<EP&&node[i].h<EP)continue;
              //  if(d1<r-EP&&fabs(d-r)<EP){
               //     mp[s[i]]++;
               //    continue;
              //  }
                if(d>=r-EP||(fabs(p.x)<EP&&p.y>0))
                    mp[s[i]]++;
            }
            for (it = mp.begin(); it != mp.end(); it++)
            printf("%s\n", it->first.data());
            printf("\n");
        }
        return 0;
    }


     

     

    展开全文
  • Android代码-Wa-Tor

    2019-08-06 18:08:08
    Wa-Tor Introduction This app simulates a torus (or donut) shaped planet, which is home to fish and shark. The fish happily reproduce while the shark need to eat fish to survive. The world is ...
  • 求教,两份代码思路是一样的,一个直接计数另一份用数组存数,结果一个wa一个ac?明明都是一样的呀 题目链接:[cf](https://codeforces.com/contest/1367/problem/B "") ``` #pragma GCC optimize("O3") #...
  • 数据测试了好几个都没问题,可以就是WA不让过,检测了2个小时还是没发现有什么问题T_T!!求高手看看代码,小弟在此谢谢各位哦! #include <stdio.h> #include <stdlib.h> #define max 1000 /* run ...

    FireShot Pro Screen Capture #015 - 'HangZhouDianZiUniversity' - acm_hdu_edu_cn_game_entry_problem_show_php_chapterid=1&sectionid=3&problemid=18

    数据测试了好几个都没问题,可以就是WA不让过,检测了2个小时还是没发现有什么问题T_T!!求高手看看代码,小弟在此谢谢各位哦!

    #include <stdio.h>
    #include <stdlib.h>
    #define max 1000
    /* run this program using the console pauser or add your own getch, system("pause") or input loop */
    
    int main(int argc, char *argv[]) {
        int  stu[max];   //学生的ID 
        int  stur[max];  //学生的成绩 
        int rank,jack_id; //查找的ID 
        int flag[101];        
        int i,jack,n;
        freopen("in.txt","r",stdin);
        while(scanf("%d",&jack)!=EOF){
            for( i=0 ; i<max ;i++) {
                stu[i]=0;
                stur[i]=0;
            }
            for( i=0 ; i<101 ;i++) {
                flag[i]=1;
            }
            for( i=0 ;  ;i++) {
                scanf("%d%d",&stu[i],&stur[i]);
                if(stu[i]==0&&stur[i]==0) break;
            }
            n=i;
            for( i=0 ; i<n ; i++) {
                if(jack==stu[i]) {
                    jack_id=i;
                }
            }
            rank=1;
            for( i=0 ; i<n ; i++) {
                if((stur[i]>stur[jack_id])&&(flag[stur[i]]!=0)){    //找到比自己大的成绩rank++ 
                    rank++;
                    flag[stur[i]]=0;
                }
                    
            }
            printf("%d\n",rank);
        
        }
        
        
        return 0;
    }

    转载于:https://www.cnblogs.com/hInstance/p/3462173.html

    展开全文
  • 这个题让我很伤心,贴一个深搜的代码,是WA的,检查很多遍了都不知道错哪了,望大神赐教啊,哪组数据有问题说说也可以啊,我测了我能找到的所有数据都没发现问题,实在是不想留下这个遗憾啊 #include #include #...
    A Dicey Problem
    Time Limit: 1000MS   Memory Limit: 65536K
    Total Submissions: 832   Accepted: 278

    Description

    The three-by-three array in Figure 1 is a maze. A standard six-sided die is needed to traverse the maze (the layout of a standard six-sided die is shown in Figure 2). Each maze has an initial position and an initial die configuration. In Figure 1, the starting position is row 1, column 2-the "2" in the top row of the maze-and the initial die configuration has the "5" on top of the die and the "1" facing the player (assume the player is viewing the maze from the bottom edge of the figure). 

    To move through the maze you must tip the die over on an edge to land on an adjacent square, effecting horizontal or vertical movement from one square to another. However, you can only move onto a square that contains the same number as the number displayed on the top of the die before the move, or onto a "wild" square which contains a star. Movement onto a wild square is always allowed regardless of the number currently displayed on the top of the die. The goal of the maze is to move the die off the starting square and to then find a way back to that same square. 

    For example, at the beginning of the maze there are two possible moves. Since the 5 is on top of the die, it is possible to move down one square, and since the square to the left of the starting position is wild it is also possible to move left. If the first move chosen is to move down, this brings the 6 to the top of the die and moves are now possible both to the right and down. If the first move chosen is instead to the left, this brings the 3 to the top of the die and no further moves are possible. 

    If we consider maze locations as ordered pairs of row and column numbers (row, column) with row indexes starting at 1 for the top row and increasing toward the bottom, and column indexes starting at 1 for the left column and increasing to the right, the solution to this simple example maze can be specified as: (1,2), (2,2), (2,3), (3,3), (3,2), (3,1), (2,1), (1,1), (1,2). A bit more challenging example maze is shown in Figure 3. 

    The goal of this problem is to write a program to solve dice mazes. The input file will contain several mazes for which the program should search for solutions. Each maze will have either a unique solution or no solution at all. That is, each maze in the input may or may not have a solution, but those with a solution are guaranteed to have only one unique solution. For each input maze, either a solution or a message indicating no solution is possible will be sent to the output. 

    Input

    The input file begins with a line containing a string of no more than 20 non-blank characters that names the first maze. The next line contains six integers delimited by single spaces. These integers are, in order, the number of rows in the maze (an integer from 1 to 10, call this value R), the number of columns in the maze (an integer from 1 to 10, call this value C), the starting row, the starting column, the number that should be on top of the die at the starting position, and finally the number that should be facing you on the die at the starting position. The next R lines contain C integers each, again delimited by single spaces. This R * C array of integers defines the maze. A value of zero indicates an empty location in the maze (such as the two empty squares in the center column of the maze in Figure 3), and a value of -1 indicates a wild square. This input sequence is repeated for each maze in the input. An input line containing only the word "END" (without the quotes) as the name of the maze marks the end of the input.

    Output

    The output should contain the name of each maze followed by its solution or the string "No Solution Possible" (without the quotes). All lines in the output file except for the maze names should be indented exactly two spaces. Maze names should start in the leftmost column. Solutions should be output as a comma-delimited sequence of the consecutive positions traversed in the solution, starting and ending with the same square (the starting square as specified in the input). Positions should be specified as ordered pairs enclosed in parentheses. The solution should list 9 positions per line (with the exception of the last line of the solution for which there may not be a full 9 positions to list), and no spaces should be present within or between positions.

    Sample Input

    DICEMAZE1
    3 3 1 2 5 1
    -1 2 4
    5 5 6
    6 -1 -1
    DICEMAZE2
    4 7 2 6 3 6
    6 4 6 0 2 6 4
    1 2 -1 5 3 6 1
    5 3 4 5 6 4 2
    4 1 2 0 3 -1 6
    DICEMAZE3
    3 3 1 1 2 4
    2 2 3
    4 5 6
    -1 -1 -1
    END
    

    Sample Output

    DICEMAZE1
      (1,2),(2,2),(2,3),(3,3),(3,2),(3,1),(2,1),(1,1),(1,2)
    DICEMAZE2
      (2,6),(2,5),(2,4),(2,3),(2,2),(3,2),(4,2),(4,1),(3,1),
      (2,1),(2,2),(2,3),(2,4),(2,5),(1,5),(1,6),(1,7),(2,7),
      (3,7),(4,7),(4,6),(3,6),(2,6)
    DICEMAZE3
      No Solution Possible
    

    Source


    这个题让我很伤心,贴一个深搜的代码,是WA的,检查很多遍了都不知道错哪了,望大神赐教啊,哪组数据有问题说说也可以啊,我测了我能找到的所有数据都没发现问题,实在是不想留下这个遗憾啊
    #include<stdio.h>
    #include<string.h>
    #include<ctype.h>
    
    int r,c,map[15][15],vis[15][15][7][7],die[][6]={{7,4,2,5,3,7},{3,7,6,1,7,4},{5,1,7,7,6,2},{2,6,7,7,1,5},{4,7,1,6,7,3},{7,3,5,2,4,7}};//die[i][j]表示i+1为top j+1为face时骰子左边的点数
    int sr,sc;//face[7]={0,6,5,4,3,2,1},
    int dx[4]={0,0,1,-1},dy[4]={1,-1,0,0},w,deep;
    char name[25];
    
    struct point
    {
    	int i,j,fi,fj;
    }s[3000];
    
    int bound(int y,int x)
    {
    	if(x>=1&&x<=c&&y>=1&&y<=r)
    		return 1;
    	else
    		return 0;
    }
    
    int dfs(struct point a,int facenum,int topnum)//r是行c是列
    {
    	int i,j;
    	if(a.i==sr&&a.j==sc&&deep>0)
    		return 1;
    	deep++;
    	for(i=0;i<4;i++)
    	{
    		if(bound(a.i+dy[i],a.j+dx[i])&&(map[a.i+dy[i]][ a.j+dx[i]]==-1||map[a.i+dy[i]][a.j+dx[i]]==topnum))
    		{
    			if(i<2)
    			{
    				if(i==0)
    				{
    					if(!vis[a.i+1][a.j][topnum][7-facenum])//表示向下滚(i增大)
    					{
    						vis[a.i+1][a.j][topnum][7-facenum]=1;
    						s[w].i=a.i+1;
    						s[w].j=a.j;//s[w].fi=a.i;s[w].fj=a.j;
    						w++;
    						if(dfs(s[w-1],topnum,7-facenum))
    						{
    						//	printf("(%d,%d)",a.i,a.j);
    							return 1;
    						}
    						else w--;
    					}
    				}
    				else
    				{
    					if(!vis[a.i-1][a.j][7-topnum][facenum])//向上滚(也就是i减小的方向)
    					{
    						vis[a.i-1][a.j][7-topnum][facenum]=1;
    						s[w].i=a.i-1;
    						s[w].j=a.j;//s[w].fi=a.i;s[w].fj=a.j;
    						w++;
    						if(dfs(s[w-1],7-topnum,facenum))
    						{
    						//	printf("(%d,%d)",a.i,a.j);
    							return 1;
    						}
    						else w--;
    					}
    				}
    			}
    			else
    			{
    				if(i==2)
    				{
    					if(!vis[a.i][a.j+1][facenum][die[topnum-1][facenum-1]])//向右滚
    					{
    						vis[a.i][a.j+1][facenum][die[topnum-1][facenum-1]]=1;
    						s[w].i=a.i;
    						s[w].j=a.j+1;//s[w].fi=a.i;s[w].fj=a.j;
    						w++;
    						if(dfs(s[w-1],facenum,die[topnum-1][facenum-1]))
    						{
    						//	printf("(%d,%d)",a.i,a.j);
    							return 1;
    						}
    						else w--;
    					}
    				}
    				else
    				{
    					if(!vis[a.i][a.j-1][facenum][7-die[topnum-1][facenum-1]])//向左滚
    					{
    						vis[a.i][a.j-1][facenum][7-die[topnum-1][facenum-1]]=1;
    						s[w].i=a.i;
    						s[w].j=a.j-1;//s[w].fi=a.i;s[w].fj=a.j;
    						w++;
    						if(dfs(s[w-1],facenum,7-die[topnum-1][facenum-1]))
    						{
    						//	printf("(%d,%d)",a.i,a.j);
    							return 1;
    						}
    						else w--;
    					}
    				}
    			}
    		}
    	}
    	return 0;
    }
    
    int scan()//优化输入的
    {  
        char c;  
        int ret;  
        int sig=0;  
        while(isspace(c=getchar()))  
            ;  
        if(c=='-')  
        {  
            sig=1;  
            c=getchar();  
        }  
        ret=c-'0';  
        while((c=getchar())>='0'&& c<='9')  
            ret=ret*10+c-'0';  
        return sig?-ret:ret;  
    }  
    int main()
    {
    	int i,j,k,ft,ff;
    	while(1)
    	{
    		gets(name);
    		if(strcmp(name,"END")==0)
    			break;
    		//scanf("%d%d%d%d%d%d",&r,&c,&sr,&sc,&ft,&ff);
    		r=scan();
    		c=scan();
    		sr=scan();
    		sc=scan();
    		ft=scan();
    		ff=scan();
    		for(i=1;i<=r;i++)
    			for(j=1;j<=c;j++)
    			{
    				//scanf("%d",&map[i][j]);
    				map[i][j]=scan();
    			}
    		//getchar();
    		memset(s,0,sizeof(s));
    		memset(vis,0,sizeof(vis));
    		s[0].i=sr;
    		s[0].j=sc;
    		w=1;
    		puts(name);
    		deep=0;
    		if(dfs(s[0],ff,ft))
    		{
    			printf("  ");
    			for(i=0;i<w-1;i++)
    			{
    				printf("(%d,%d),",s[i].i,s[i].j);
    				if((i+1)%9==0)
    				{
    					printf("\n  ");
    				}
    			}
    			printf("(%d,%d)\n",s[i].i,s[i].j);
    		}
    		else printf("  No Solution Possible\n");
    	}
    	return 0;
    }


    展开全文
  • #include int main() { int i,j,t,n; int max,sum,count=1; int a[100001]={0}; scanf("%d",&t); while(t--) { i=0; sum=0; n=1; scanf("%d",&a[i++]); while(a[0]--) scanf("%d",&a[i++]);...
  • wagtail-metadata-mixin:Wa Wagtail CMS页面的OpenGraph,Twitter Card和Schema.org代码段标签
  • 2019-8-25 ...附WA代码: #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; char a[10][10]; int black[65]; int ...
  • 这道题真的是搞心态的神仙题了,由于到最后还是晕晕乎乎...WA代码: #include <iostream> #include <algorithm> #include <cstring> using namespace std; #define DQ 99999 #define eps 1e-8 st...
  • 这道并查集题目我的思路是在输入房间号的时候判断房间是否已经被联通过,联通过则标记使得str为No,考虑了房间数为0和自环,给的案例也都通过了,为什么一直wa呢?拜请各位大佬帮忙看看到底错在哪里,这是我的代码:...
  • 代码: #include #include #include #define LL long long #define mod 1000000007 using namespace std; //访问和成功标记 bool status[45],sign; //记录搜索路径 int path[45]; //平均值,cnt为当前第几组...
  • 肯跌呀,过不了,自己想的样例和题目给的样例都能过,求大神 给指出wa在那里? 题目分析:Ignatius 在(0,0),princess在(N-1,M-1),每个格子可能是'X','.'或者是数字time(1-9),如果是数字则说明要消耗time时间在...
  • 我的代码 #include #include int fa[10000+10],ma[10000+10],ch[10000+10],n; void slove(int x,int y) { int t,zd,k=0,flag=0,i,var=0; char z[10000+5]; if(x) { t=x; x=y; y=t; var=1; } while(x>y) { ...
  • 代码: #include #include #include typedef struct stu{ char name[100]; int age; int grade; }Stu; int cmp(const void *a,const void *b){ int c; Stu *aa = (Stu *)a; ...
  • #include #include #include #include #include using namespace std; int main() { int k[1005],t[1005]; int n,ans,t1,t2,k1,k2; while(cin>>n&&n!=0) { for(int i=0;i;i++) cin>>t[i];...}
  • 思路 标记最小的最后的位置 放在第一位...不多说先贴上销毁内存的wa代码 销毁内存的wa代码 1 #include<cstdio> 2 #include<map> 3 #include<vector> 4 #include<stack> 5 #i...
  • 参考思想即可,代码WA,很奇怪 不容易系列之(3)—— LELE的RPG难题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 18598 Accepted...
  • 直接上代码,没什么好说的。#include #include #define LMT 205 #define eps 3e8 typedef struct { int u,v; }line; line e[LMT*LMT]; int mat[LMT][LMT],fmat[LMT][LMT],q[LMT],lev[LMT],lim[LMT][LMT]; int n,m; ...
  • #include<stdio.h> #include<math.h> int main() { int n; double w,vr,vs,r,c; scanf("%lf%lf%lf%d",&vs,&r,&c,&n);//第7行变量应全用double while(n--) ...}
  • 假设你有一个各位数字互不相同的四位数,把所有的数字从大到小排序后得到a,从小到大后得到b,然后用a-b替换原来这个数,并且继续操作。例如,从1234出发,依次可以得到4321-1234=3087、8730-378=8352、8532-2358=6174...
  • 给大家提供一个类,这个类能够实现大文件的本地拷贝,占用缓存少,网址是:http://dl2.csdn.net/down4/20070920/20004111556.rar本类中提供了3个属性,两个方法,两个事件属性1:BlockLength:用于设置或获取每次传输时文件...
  • ```cpp #include #include #include using namespace std; int cnt; bool book[26]; char key[26]; string a,b,c; int main() { getline(cin,a); getline(cin,b); getline(cin,c);...
  • 本组件已经将ADO.NET中的核心类进行了封装,有源代码,可以自行修改. 压缩包中有源代码及示例,如果有什么问题,可以给本工作室发送Email: warensoft@foxmail.com或warensoft@sina.com 下载网址:...
  • ---------- #include #include #include using namespace std; bool Map[55][55]; bool vis[55][55][4]; //[4] 四个directions,坐标和方向都相同时不能同时经过该点两次; int M,N; ...
  • 代码如下: //#include #include #include #include #include #include using namespace std; const int maxn = 105; int next[maxn]; int ans[maxn]; string s[maxn]; void getnext(string a) { int i = 0;int j =...
  • wa-源码

    2021-02-16 03:59:51
    代码脚手架 运行ng generate component component-name生成一个新的组件。 您还可以使用ng generate directive|pipe|service|class|guard|interface|enum|module 。 建造 运行ng build来构建项目。 构建工件将存储在...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 6,486
精华内容 2,594
关键字:

wa代码