NOIP200305 Neural Network (c + +)

#include using namespace Std;BOOL ans[2001],not_last[2001];int c[2001],w[201][2001],u[2001],before[2001][2001];int n,i,j,p,seve;void find (int x) {if (c[x]!=0) return;int i;for (I=1;iInt J;J=before[x][i];Find (j);if (c[j]>0) c[x]+=w[j][x]*c[j];}C[X]-

NOIP201508 Jumping Stone (c + +)

#include #include using namespace Std;const int maxn=50005;int A[maxn],n,m,ans;BOOL Check (int x){int sum,last;sum=0;last=0;for (int i=1;i{if (a[i]-lastLast=a[i];}if (sum>m) return 0;return 1;}int main (){int l,r,mid;scanf ("%d%d%d\n", &l,&n,&m);for

C Language Programming second job

I. Contents of the study Mastering relational operators, logical operators, conditional operators Mastering the usage of common mathematical functions If statement (single branch, dual branch, and multi-branch) Using switch

Hanoi (c + +)

#include using namespace Std;void write (int x){if (x==0){Putchar (' 0 ');return;}if (x{Putchar ('-');X=-x;}int len=0,buf[15];while (x){buf[len++]=x%10;x/=10;}for (int i=len-1;i>=0;i--) Putchar (buf[i]+ ' 0 ');return;}int read (){int X=0,f=1;char Ch=

Calculate score (c + +)

#include #include #include using namespace Std;int a[6],b[6],i,a,b,cnt,n,j;int main (){Freopen ("Jisuan.in", "R", stdin);Freopen ("Jisuan.out", "w", stdout);Char str[400];cin>>str;N=strlen (str);for (i=0;i{if (str[i]== ' A ') a[cnt]++;if (str[i]== '

NOIP200204 River Crossing (C + +)

#include #include int n,m,x,y;int map[25][25];Long Long dp[25][25]; int move[8][2]={{-1,2},{-2,1},{1,2},{2,1},{-1,-2},{-2,-1},{1,-2},{2,-1}}; int inarea (int x,int y){return x>=0 && y>=0 && x} int main (){scanf ("%d%d%d%d", &n,&m,&x,&y);memset (map,

40026118 number of prime numbers (C + +)

#include #define LL Long Long#define MAXN 1000010using namespace Std;LL Read (){LL x=0,f=1;Char C=getchar ();while (!isdigit (c)) {if (c== '-') F=-1;c=getchar ();}while (IsDigit (c)) {x=x*10+c-' 0 '; C=getchar ();}return x*f;}BOOL PRIME[MAXN];LL

NOIP201507 bucket Landlord (c + +)

#include #include using namespace Std;#define N 30int n,t,ans,a[n],c[n];int query () {memset (c,0,sizeof c);for (int i=0;iint tot=0;while (c[4]&&c[2]>1) c[4]--, c[2]-=2,tot++;while (c[4]&&c[1]>1) c[4]--, c[1]-=2,tot++;while (C[4]&&c[2]) c[4]--, c[2]-

NOIP201006 Turtle Chess (c + +)

#include using namespace Std;int dp[50][50][50][50] = {0};int b[5]={0};int max (int A, int b, int c, int d){int m = A;if (b>m) m = b;if (c>m) m = c;if (d>m) m = D;return m;}int main (){int n,m; CIN >> n >> m;int a[n];for (int i=0; i{CIN >> A[i];}for

Split Ham (c + +)

gcd

#include #include #include #include #include #include #define MOD 1000000007#define LL Long Longusing namespace Std;int T;int n,m;int read (){int X=0,f=1;char Ch=getchar ();while (ch ' 9 ') {if (ch== '-') F=-1;ch=getchar ();}while (ch>= ' 0 '

C # Multithreading

Since the Framework 2.0, multithreading in the thread after the very good encapsulation, management multithreading has become more simple. Now the C # multi-threading knowledge points for management induction.Use of the thread class: (but the

Isle of DAO for Medicine (i) (c + +)

#include #include using namespace Std;Char map[101][101];int a[101][101],ans=0,m,n;void res (int u,int v,int I,int j){int T=A[U][V];if (u==i&&v==j) ans=t;t++;if (vt){a[u][v+1]=t;Res (U,V+1,I,J);}if (u>0&&map[u-1][v]!= ' # '

C # Console Base directory determines whether the specified folder exists under the specified path

1 Probing folders2 Code1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.IO;4 usingSystem.Linq;5 usingSystem.Text;6 usingSystem.Threading.Tasks;7 8 namespaceDirectory Create a folder9 {Ten class Program One { A Static

C # console Basic directory get the names of all folders under a folder (not including files)

1 Probing folders2 Code1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.IO;4 usingSystem.Linq;5 usingSystem.Text;6 usingSystem.Threading.Tasks;7 8 namespaceConsoleApplication29 {Ten class Program One { A Static voidMain (

C # delegates and events

When I first learned C #, not completely thoroughly understand, but now continue ... Owe raking ....http://www.cnblogs.com/chengxingliang/archive/2013/05/21/3051912.html----Easy to understand, in line with my reading

C # 128-bit AES encryption decryption

///AES Encryption2///3///The data entered4///Vector 128 Bit5///Encryption key6///7PublicStaticByte[] Aesencrypt (Byte[] Inputdata,Byte[] IV,Stringstrkey)8{9//Packet encryption algorithmTen SymmetricAlgorithm des =Rijndael.create ();11byte[]

C # overrides a control label

1. First you drag a Label control onto the form.2. Create a class that is ready to inherit, such as Labelex, derived from the label class Public classLabelex:label {//left mouse button Double-click Message Private Const

Learning from C # Delegation

delegate int getcalculatedvaluedelegate (int x, int y); A definition is a delegate that is actually an abstract class of parameter list form and return value of the same function addcalculator,subcalculator both the parameter form of the function

C # Delegate

Public classMybuttonevent:monobehaviour {Delegate voidProxy (); //Use this for initialization voidStart () {Debug.Log ("mybuttonevent---start"); Proxy Pxy= Onmyclick;//can be directly assigned, actually is the function pointerPxy + =

C ++ STL-algorithm (1), stlalgorithm

C ++ STL-algorithm (1), stlalgorithm I have recently worked hard to learn C ++ advanced programming knowledge. I would like to summarize some of my STL algorithm methods over the weekend and share them with you. Non-modifier algorithm: I. for_each

Total Pages: 5902 1 .... 5731 5732 5733 5734 5735 .... 5902 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.