search
HomeWeb Front-endHTML Tutorialcodeforces 260 div2 A,B,C_html/css_WEB-ITnose

A: Water question, after sorting the structures, check whether the sequences of the two arrays are the same.

B: Write out the nth power of 1, 2, 3, 4 respectively, taking the modulus of 5. You will find that there is a loop section with the remainder of 5. If %4 = 0, output 4, otherwise output 0.

Just write a large number and take the remainder.

B. Fedya and Maths

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Fedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression:

(1n? ?2n? ?3n? ?4n) mod 5

for given value of n. Fedya managed to complete the task. Can you? Note that given number n can be extremely large (e.g. it can exceed any integer type of your programming language).

Input

The single line contains a single integer n (0?≤?n?≤?10105). The number doesn't contain any leading zeroes.

Output

Print the value of the expression without leading zeros .

Sample test(s)

input

output

input

124356983594583453458888889

output

Note

Operation x mod y means taking remainder after division x by y.

Note to the first sample:

#include <algorithm>#include <iostream>#include <stdlib.h>#include <string.h>#include <iomanip>#include <stdio.h>#include <string>#include <queue>#include <cmath>#include <stack>#include <ctime>#include <map>#include <set>#define eps 1e-9///#define M 1000100///#define LL __int64#define LL long long///#define INF 0x7ffffff#define INF 0x3f3f3f3f#define PI 3.1415926535898#define zero(x) ((fabs(x)<eps namespace std int maxn="1000010;int" main string s while>>s)    {        int n= s.size();        int cnt = s[0]-'0';        for(int i = 1; i  <br> C: Give you some numbers, you take If a number is 1 greater than this number, the numbers 1 and 1 less will be deleted. Ask you for the sum of the largest numbers you can get.  <p></p> <p>First hash based on the number, and then perform linear dp pass, dp[i][1] = ma(dp[i-2][0], dp[i-2][1 ]) vis[i]*i,dp[i][0] = max(dp[i-1][0], dp[i-1][1]). 1 means to take this number, 0 means not to take it . Note that the data type must be long long. </p> <p></p> <p class="sycode"> </p>
<p class="sycode"> </p>
<p class="sycode"> </p>
<p class="sycode"> </p>
<p class="sycode"> </p>
<p class="sycode"> </p>
<p class="sycode"> C. Boredom </p> <p class="sycode"> </p>
<p class="sycode"> time limit per test </p> 1 second  <p class="sycode"> </p>
<p class="sycode"> memory limit per test </p> 256 megabytes  <p class="sycode"> </p>
<p class="sycode"> input </p> standard input  <p class="sycode"> </p>
<p class="sycode"> output </p> standard output   <p class="sycode"> </p>
<p> Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and decided to play it. </p> <p> Given a sequence a consisting of n integers. The player can make several steps. In a single step he can choose an element of the sequence (let's denote it ak) and delete it, at that all elements equal to ak? ? 1 and ak?-?1 also must be deleted from the sequence. That step brings ak points to the player.</p> <p> Alex is a perfectionist, so he decided to get as many points as possible. Help him.</p>  <p class="sycode"> </p>
<p class="sycode"> Input </p> <p> The first line contains integer n (1?≤?n?≤?105) that shows how many numbers are in Alex's sequence.</p> <p> The second line contains n integers a1, a2, ..., an (1?≤?ai?≤?105).</p>  <p class="sycode"> </p>
<p class="sycode"> Output </p> <p> Print a single integer? the maximum number of points that Alex can earn.</p>  <p class="sycode"> </p>
<p class="sycode"> Sample test(s) </p> <p class="sycode"> </p>
<p class="sycode"> </p>
<p class="sycode"> input </p> <pre style="代码" class="precsshei">21 2

output

input

31 2 3

output

input

91 2 1 3 2 2 2 2 3

output

10

Note

Consider the third test example. At first step we need to choose any element equal to 2. After that step our sequence looks like this [2,?2,?2,?2]. Then we do 4 steps, on each step we choose any element equals to 2. In total we earn 10 points.


#include <algorithm>#include <iostream>#include <stdlib.h>#include <string.h>#include <iomanip>#include <stdio.h>#include <string>#include <queue>#include <cmath>#include <stack>#include <ctime>#include <map>#include <set>#define eps 1e-9///#define M 1000100///#define LL __int64#define LL long long///#define INF 0x7ffffff#define INF 0x3f3f3f3f#define PI 3.1415926535898#define zero(x) ((fabs(x)<eps namespace std int maxn="1000010;LL" vis dp main n while>>n)    {        int x;        memset(vis, 0, sizeof(vis));        memset(dp, 0, sizeof(dp));        for(int i = 0; i   <br>  <br>  <p></p> </eps></set></map></ctime></stack></cmath></queue></string></stdio.h></iomanip></string.h></stdlib.h></iostream></algorithm>
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
HTML as a Markup Language: Its Function and PurposeHTML as a Markup Language: Its Function and PurposeApr 22, 2025 am 12:02 AM

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment