# SMTP Outgoing server address and port number[Email protected]Smtp_password=myispassword# Sender ID and passwordSmtp_from = [email protected]# Sender AddressSmtp_subject = denyhosts Report# Alert Message Subjectage_reset_valid=5d# Normal user logon failure counter zero timeage_reset_root=25d# Root user logon failure counter zero timeage_reset_restricted=25d# Global User failed login count reset to 0 time (/usr/share/denyhosts/data/restricted-usernames)age_reset_invalid=10d# How long the invalid
Title Link: Http://www.codeforces.com/problemset/problem/460/ATest instructions: Vasya every day with a pair of socks, her mother every m days to send him a pair of socks, Vasya a start with n pairs of socks, the first few days when Vasya will not wear socks?C + + code:#include using namespacestd;intN, M;intMain () {CIN>> N >>m; intD =0; while(n) {d++; if(n) n--; Else Break; if(d% m = =0) n++; } coutD; return 0;}C + +The 15th question of codeforces water question 100 codeforces Roun
Title Link: Http://www.codeforces.com/problemset/problem/271/ATest instructions: Give you a four-digit number, which is the smallest of the number that satisfies the four-bit number with a different four-digit size.C + + code:#include #includeusing namespacestd;BOOLChkintx) { inta[4]; for(inti =0; I 4; i + +) {A[i]= x%Ten; X/=Ten; } sort (A, a+4); for(inti =1; I 4; i + +) if(A[i] = = a[i-1]) return false; return true;}int Get(Const intx) { for(inti = x+1; ; i + +)
Title Link: Http://www.codeforces.com/problemset/problem/122/ATest instructions: Determines whether a number can be divisible by a lucky, a lucky number that contains only 4 or 7.C + + code:#include intlucky[ -] = {4,7, -, -, About, the,444,447,474,477,744,747,774,777};BOOLCheckintx) { for(inti =0; I -; i + +) if(x% lucky[i] = =0) return true; return false;}intMain () {intN; scanf ("%d", N); Puts (check (n)?"YES":"NO"); return 0;}C + +Codeforces Water 100 question 12th cod
Title Link: Http://www.codeforces.com/problemset/problem/231/ATest instructions: Ask how many of the questions in the N-way question are at least two people will.C + + code: #include using namespace Std; int N, a, B, C, ans; int Main () {cin >> n; while (N-- >>a ;> b >> C; if (A + B + C >= 2 ) ans ++; } cout ans; return 0 ;} C + +The 11th question of codeforces water question 100 codeforces Round #143 (Div. 2) A. Team (Brut
Topic Links:AbsTime limit:2000/1000 MS (java/others)Memory limit:131072/131072 K (java/others)Problem Descriptiongiven A number x, ask positive integer y≥2, that satisfy the following conditions:1. The absolute value of y-x is minimal2. To prime factors decomposition of Y, every element factor appears. Inputthe first line of input was an integer T (1≤T≤ )For each test case,the a single line contains, an integer x ( 1≤x≤ten)Outputfor each testcase print the absolute value of y-xSample Input 5
Test instructions: Given a n*m chess board, put some pieces, ask you can put a few guns (Chinese chess gun).Analysis: Actually very simple, because the chessboard is 5*5 biggest, then the direct violence on the line, can be regarded as a line, very water, time is very short, only 62ms.The code is as follows:#include HDU 4499 Cannon (brute force solution)
; J ) the { the intScore = v[i] * -;94 intRound1 =Divide (P[j], a[i]); the intRound2 =Divide (H[i], b[j]); the if(Round1 > Round2) score =-score; the if(i = = j) score++;98W[I][J] =score; About } - 101 KM ();102 103 intAns =0;104 for(inti =1; I W[lft[i]][i]; the 106 if(Ans 0)107 {108Puts"Oh, I lose my dear seaco!");109 Continue; the }111 th
, in the case of no optimal positive solution, can also be written in accordance with the time complexity of the violent solutionSimilar topics, more from factorization. In fact, the prime number itself is less, the quality factor is less, so efficiency will be more efficientCode#include #include#include#includeusing namespacestd;structNode {Long LongDataintzs,nt,mp; BOOL operatorConstNode A)Const {returndataA.data;} }now,tmp;priority_queueQ;Long LongN,x;intk,j;intprime[50]={0,2,3,5,7, O
illegal link to shield off. and block out the spam, only keep normal mail delivery to the server, greatly reducing the malicious connection and virus mail caused by the security risks, see below the relevant schematic diagram.650) this.width=650; "src=" Http://www.unioncyber.net/images/20160418-3.jpg "height=" 534 "width=" 793 "alt=" 20160418-3.jpg "/>650) this.width=650; "src=" Http://www.unioncyber.net/images/20160418-3.jpg "height=" 534 "width=" 793 "alt=" 20160418-3.jpg "/>Can be clearly se
Sometimes it's lazy, and I can't see anyone else trying to get the SSH port.Try to use the next fail2ban this software, simple rough is the effect we want.yum installfail2ban -y //epelcp /etc/fail2ban/jail.conf /etc/fail2ban/jail.localvim /etc/fail2ban/jail.local# "IGNOREIP" can be a IP address, a CIDR mask or a DNS host. Fail2ban would not# Ban a host which matches an address on this list. Several addresses can be# Defined using space separator. Multiple IPs are separated by spaces, and this is
Test instructions: Given a sequence of DNA of length n of M, a shortest sequence of DNA is obtained, which minimizes the total hamming distance.Hamming the distance is equal to the number of different positions of characters.Analysis: See this problem, my first feeling is to calculate the time complexity, good small, nothing, completely can violence, as long as the same position on each string,The choice appears most, if has the same choice ASIIC code small (because requires the dictionary order
I can finally say that this is my own independent completion of the topic, did not see the problem, not read the notes, although the time to write, there is a sense of accomplishment, last night wrote a probably, a little bug, because too late, and a little sleepy, went to bed, then really himself seriously thought, and very deep thinking, Use the bit vectors that have just been learned in the book to judge by their own generation. In the future, we must strive to think, solve their own, focus .
E.... Rice still did not read the question .... T_t .....E.... This is the legendary violence .... It's bloody .... It's too violent ... Kokonoe for loop .... It's such a naked ac ....Water is a bit of water. But.. I didn't think it was possible. Because each operation can only be done at most three times or it is repeated. So 、、、 attached code:#include #include #include #define for (x) for (x=0; xusing namespace Std;int main (){int a[10], b[10], c[10];for (int i=0; iCIN >> A[i];for (B[0])for (B
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.