JavaScript vs C++ [2026]

JavaScript vs C++ as a Career

A comprehensive, for recent graduate developers

JavaScript and C++ are both powerful, respected languages, but they solve very different problems. JavaScript is the faster path into web development, product building, remote work, and visible portfolio projects. C++ is the deeper path into systems programming, performance engineering, embedded work, game engines, and other technical specialties.

This guide breaks down both languages from every important angle: coding experience, learning curve, job opportunities, salary, portfolio building, GitHub, resume strategy, career trajectories, tier-3 college struggles, LinkedIn/X visibility, and long-term growth.

1. Quick Verdict

If your goal is to get hired faster, build projects quickly, and have more remote-friendly opportunities, JavaScript is usually the better first choice. If your goal is deep technical control, low-level problem solving, and specialized high-performance work, C++ is the stronger long-term technical path.

Simple rule: JavaScript helps you enter the market faster. C++ helps you go deeper technically.

2. Core Comparison

Aspect JavaScript C++
Nature High-level, dynamic, web-friendly Compiled, powerful, performance-focused
Primary use Web apps, frontend, backend, full-stack Systems, embedded, games, performance engineering
Memory handling Automatic garbage collection Manual control, more responsibility
Learning curve Easier to start Harder, more technical
Remote friendliness Very high Lower, more specialized
Portfolio visibility Excellent for demos and live apps Best for deep technical projects

3. Core Philosophy and Nature

JavaScript is built for speed of development. It lets you create interactive websites, apps, dashboards, and full-stack products quickly. It is the language of the browser and a major language for server-side development through Node.js.

C++ is built for control, efficiency, and performance. It is widely used in systems programming, game engines, real-time applications, embedded systems, and places where every millisecond or byte matters.

In simple terms: JavaScript helps you build fast. C++ helps you control what happens under the hood.

4. Learning Curve and Beginner Friendliness

JavaScript is more beginner-friendly because you can run it immediately in a browser and see results fast. That makes learning feel rewarding. C++ is harder at the start because you need to understand compilation, pointers, memory, data types, and project setup earlier.

For many learners, JavaScript gives a better emotional start. C++ gives a stronger foundation in how software works at a lower level, but it takes more patience.

Beginner rule of thumb: choose JavaScript if you want quick visible progress. Choose C++ if you genuinely enjoy technical depth and want to understand systems more deeply.

5. Job Market in India

JavaScript has a much larger job surface area in India because almost every company needs websites, dashboards, internal tools, customer portals, or web-based products. This creates more entry-level roles, especially in startups, agencies, product companies, SaaS firms, and freelance work.

C++ jobs are fewer, but they are usually more specialized and often pay well in the right domain. Typical C++ roles appear in embedded systems, operating systems, game development, trading systems, robotics, networking, and high-performance backend work.

Common job roles

  • JavaScript: frontend developer, backend developer, full-stack developer, React developer, Node.js developer, web engineer.
  • C++: systems engineer, embedded developer, game engine developer, performance engineer, compiler/tooling engineer, low-latency engineer.

Why this matters

If you are trying to get into the market quickly, JavaScript usually gives you more opportunities and more portfolio-friendly roles. If you are aiming for specialized technical teams, C++ can be powerful, but the entry is narrower.

6. Salary and Growth

At the entry level, JavaScript is often easier to access because the market is broader. Salary growth becomes strong when you combine it with React, TypeScript, Node.js, cloud deployment, and strong project work.

C++ may start with a smaller pool of jobs, but compensation can rise strongly in specialized tracks. High-paying C++ roles usually reward depth, precision, and technical rigor.

Long-term view: JavaScript is broader. C++ is deeper. Both can lead to excellent careers.

7. Remote Work and Freelancing

JavaScript is much more remote-friendly because web development is easy to ship, review, and collaborate on across locations. It is also easier to freelance with because clients understand websites, dashboards, and apps clearly.

C++ remote work exists, but it is less common and usually tied to niche, senior, or highly technical teams. Freelancing in C++ is much less common than freelancing in JavaScript.

8. Portfolio and GitHub Strategy

A JavaScript portfolio should show live demos, clean UI, responsive design, API integration, and deployed applications. Recruiters like seeing visible results quickly.

A C++ portfolio should show technical depth, system behavior, benchmarking, correctness, and performance awareness. The projects may be fewer, but they should be deeper.

Good JavaScript project ideas

  • Portfolio website with project demos
  • CRUD app with login and database storage
  • Dashboard with charts and filtering
  • Full-stack app with authentication
  • Clone of a real product with a unique feature

Good C++ project ideas

  • Mini HTTP server
  • Multithreaded file indexer
  • Ray tracer
  • Chess engine
  • Memory allocator or benchmark tool

GitHub matters because

  • It shows proof of work.
  • It gives recruiters something to inspect.
  • It helps you look active and serious.
  • It makes your projects searchable and shareable.

9. Resume and CV Strategy

For JavaScript, the resume should focus on projects, live links, deployed work, frontend/backend stack, and product outcomes. For C++, the resume should focus on systems knowledge, Linux, debugging, algorithms, concurrency, and performance-related work.

Keep your CV clean, one page if possible, and make the strongest projects easy to find.

10. Quick Hiring and Career Speed

JavaScript is usually the quicker route to getting interview calls because the learning curve is easier, the market is larger, and the portfolio format is more visible. C++ can take longer because the roles are narrower and the interviews are often more theory-heavy and systems-heavy.

If your main goal is to get to paid work faster, JavaScript is usually the safer path. If your goal is niche technical depth, C++ may be the better long-term investment.

11. Tier-3 College Reality and Strategy

The biggest challenge for many tier-3 students is not ability, but exposure. There may be less guidance, fewer internship opportunities, and less brand recognition. In that situation, visible work matters more than claims.

JavaScript is often easier to use as a visibility engine because you can build things that look good in a browser and share them immediately. C++ can still work, but it usually requires stronger fundamentals and more disciplined practice to stand out.

Tier-3 winning formula: build projects, publish them on GitHub, post progress on LinkedIn, and keep improving consistently.

12. LinkedIn and X Strategy

Recruiters notice consistency, not just talent. Use LinkedIn to show projects, short write-ups, results, and your current stack. Use X to build in public, share demos, and document progress.

  • Post one project demo every time you finish something meaningful.
  • Use simple, searchable keywords like React, Node.js, C++, STL, Linux, systems, and performance.
  • Show before-and-after improvements where possible.

13. Career Trajectories

Stage JavaScript Path C++ Path
Start HTML, CSS, JavaScript, Git C++ basics, syntax, pointers, STL
Early role Frontend or full-stack developer Junior systems or software engineer
Mid-career Senior engineer, product developer, team lead Performance engineer, infra engineer, specialist
Advanced stage Tech lead, architect, startup founder Systems expert, compiler engineer, game/embedded specialist

14. Basic and Advanced Topics to Learn

JavaScript basics

  • Variables, functions, objects, arrays
  • DOM manipulation and events
  • Async programming and fetch APIs
  • Modules, Git, and browser tooling

JavaScript advanced topics

  • Closures, prototypes, and the event loop
  • TypeScript and typed frontend work
  • React, Next.js, and component architecture
  • Node.js backend, testing, performance, and security

C++ basics

  • Syntax, control flow, functions
  • Pointers, references, memory basics
  • Classes, objects, constructors, destructors
  • STL containers and algorithms

C++ advanced topics

  • Templates and modern C++ patterns
  • RAII and smart pointers
  • Move semantics and memory layout
  • Concurrency, profiling, optimization, and debugging

15. Final Decision Guide

Choose JavaScript if you want a faster entry into the market, more remote options, easier beginner progress, and a strong portfolio path. Choose C++ if you love systems, performance, low-level control, and deeper technical challenges.

A very practical strategy for many students is to start with JavaScript, get into the industry, and later go deeper into systems or performance topics if needed.

Best strategic path for most beginners: JavaScript first, then C++ later if your career direction calls for it.

16. Check this out



Final takeaway: JavaScript is broader and easier to enter. C++ is deeper and more specialized. Both are excellent, but the best one is the one you can stay consistent with long enough to become genuinely strong.

Python vs Java 2026

Python vs Java as a Career

A practical guide for students, fresh graduates, and beginners choosing a programming path

Choosing between Python and Java as a career path is one of the most common decisions for students entering software. Both are valuable, both have long-term demand, and both can lead to strong salaries. The real difference is not whether one is better in general, but which kind of work fits your goals, personality, and long-term direction.

Python is often seen as the easier language to start with because it is simple to read, quick to write, and widely used in AI, data science, automation, and modern backend work. Java is known for structure, performance, and enterprise reliability. It is heavily used in backend systems, large organizations, banking, cloud platforms, and Android-related work.

This guide explains the main differences in a simple way. It includes career paths, salary levels in India and foreign markets, beginner-to-advanced resources, and a practical portfolio strategy for fresh graduates.

Start here

If you are a beginner, the best way to choose is to ask what kind of work you want to do every day. Python usually suits people who like fast learning, experimentation, data, AI, and quick project building. Java usually suits people who like structure, system design, enterprise software, and long-term reliability.

In many cases, Python is easier for a first job entry, while Java is especially strong for backend and enterprise careers. Many developers eventually learn both, because they complement each other very well.

What each language is best for

Area Python Java
Main style Simple, fast, flexible Structured, reliable, scalable
Best for AI, data science, automation, scripting, modern backend Enterprise backend, banking, cloud systems, Android, large applications
Learning feel Easier for beginners More structured, slightly harder at first
Career signal Innovation and growth areas Enterprise stability and long-term systems

A simple way to think about it is this: Python is often used where new ideas are built quickly, while Java is often used where large systems must keep running reliably for years.

Career paths

Python career tracks

  • AI Engineer
  • Data Scientist
  • Machine Learning Engineer
  • Automation Engineer
  • Backend Developer with Django or FastAPI

Java career tracks

  • Backend Engineer with Spring Boot
  • Enterprise Architect
  • Android Developer
  • Cloud Engineer
  • FinTech Developer

Typical pay levels

Salary depends on your skills, interview performance, location, company type, and the domain you work in. These are only practical ranges to help you compare the two paths.

India (INR LPA)

Level Python Java
Fresher ₹5–8 LPA ₹4.5–7 LPA
Mid-Level ₹9–15 LPA ₹8–14 LPA
Senior ₹16–30+ LPA ₹15–28+ LPA

Foreign market (USD)

Level Python Java
Fresher $70k–95k $65k–90k
Mid-Level $95k–140k $90k–130k
Senior $130k–180k+ $120k–170k+

Learning resources by level

Beginner

  • Python: Python.org tutorials, Automate the Boring Stuff, beginner YouTube playlists
  • Java: Head First Java, Oracle Java Docs, beginner OOP courses
  • General: Git, GitHub, basic problem solving, simple coding practice

Intermediate

  • Python: Pandas, NumPy, Flask, Django, APIs
  • Java: Spring Boot, REST APIs, databases, collections, testing
  • General: LeetCode, HackerRank, mini-projects, version control workflow

Advanced

  • Python: Machine learning, data pipelines, automation at scale, deployment
  • Java: Microservices, system design, performance tuning, cloud architecture
  • General: Open-source contributions, architecture thinking, interview preparation

How to build a strong portfolio as a fresh graduate

For recent graduates, a good portfolio matters a lot. Recruiters want proof that you can solve problems, write clean code, and finish projects. A portfolio should not just contain tutorial copies. It should show that you understand the work and can present it clearly.

What to include

  • 3 to 5 real projects
  • Clean GitHub repositories with proper README files
  • At least one deployed or demo-ready project
  • Short explanations of the problem, your solution, and the result

Python portfolio ideas

  • Prediction model or small ML project
  • Data analysis dashboard
  • Automation script or bot
  • API-based project using real data

Java portfolio ideas

  • Spring Boot backend project
  • REST API application
  • Mini e-commerce backend
  • User authentication and database project

A strong rule for fresh graduates is simple: three solid projects are better than ten weak ones. Recruiters usually prefer depth, clarity, and presentation over quantity.

Strengths and trade-offs

Language Strengths Trade-offs
Python Fast development, rich library ecosystem, beginner-friendly, great for prototypes Slower runtime, less strict than Java in some large-scale systems
Java Strong performance, type safety, scalable and maintainable codebases More verbose, slightly harder for beginners, slower to write at first

Future outlook

Python is closely linked to AI, automation, analytics, and experimentation-heavy products. Java continues to power mission-critical systems in finance, telecom, logistics, government, and enterprise backend platforms. Both languages have long careers ahead of them.

How to decide

Choose Python if you want easier entry, faster prototyping, and a strong path toward AI, data science, or automation. Choose Java if you want enterprise backend jobs, structured development, and long-term system-building careers.

If you are still confused, a smart strategy is to begin with Python for speed and confidence, then learn Java for deeper backend and enterprise strength.

Scenario Better fit
Beginners Python
AI and machine learning careers Python
Enterprise and MNC backend jobs Java
Long-term stability Java
Maximum flexibility Learn both

Bottom line

Python is better for fast entry, AI, data, and automation-driven careers. Java is better for enterprise depth, scale, and stable backend opportunities. The best long-term plan for many graduates is to learn one first, build projects, and then add the other for flexibility.

Cybersecurity vs Software Development 2026

Cybersecurity vs Software Development as a Career

A practical guide for students after graduation

Choosing a career after graduation is not always easy, especially when two options both sound valuable and future-proof. Cybersecurity and software development are two of the strongest paths in tech today. Both can lead to good salaries, long careers, and global opportunities, but they are very different in the kind of work they ask you to do every day.

Software development is about building products, features, apps, and websites. Cybersecurity is about protecting systems, data, and users from threats. One path is mainly about creation, while the other is mainly about defense. That difference matters more than many beginners realize, because your daily work, your study path, and even your personality fit can be very different.

This guide explains both options in a simple way, with enough detail to help students after graduation make a realistic decision. It also includes the type of projects you can build, where the jobs are, what a normal day looks like, and how to start without overthinking.

Start here

If you have just finished graduation and are trying to choose a tech path, these two options often come up first. Software development is about building products and features. Cybersecurity is about protecting systems, data, and users from threats. Both are valuable, both pay well, and both can lead to long careers, but they reward different personality types.

Software development is usually a better fit for people who like creating things, seeing visible progress, and building products from scratch. Cybersecurity is usually a better fit for people who like investigating, spotting risks, thinking like an attacker, and defending systems before something goes wrong.

The best choice is not the one that sounds more impressive. It is the one that matches how you like to think and work every day.

What each path actually does

Area Cybersecurity Software Development
Main goal Protect systems and data Build software and features
Daily mindset Detect, prevent, respond Design, code, test, ship
Typical tools Linux, SIEM, network tools, scanners Code editors, frameworks, databases, cloud tools
Main output Safer infrastructure, fewer incidents Working apps, websites, services
Best for People who enjoy investigation and risk thinking People who enjoy creation and logic

A useful shorthand is this: software development builds the house, while cybersecurity installs the alarms, locks, and camera system.

How you learn each one

Cybersecurity learning path

  • Learn networking basics first: IP, DNS, ports, routing, and common protocols.
  • Get comfortable with Linux and basic command-line work.
  • Study security foundations: authentication, access control, vulnerabilities, encryption basics.
  • Move into hands-on labs, ethical hacking, vulnerability scanning, and incident response.
  • Later, explore cloud security, threat hunting, SOC work, and penetration testing.

Software development learning path

  • Start with a programming language such as Python, Java, or JavaScript.
  • Learn problem solving, data structures, and basic algorithm thinking.
  • Build small projects early so the concepts feel real.
  • Move into frameworks, databases, APIs, and version control.
  • Later, specialize in frontend, backend, mobile, cloud, or system design.

One important difference is this: cybersecurity often asks you to understand how systems fail, while software development asks you to understand how systems should work in the first place.

The visual route map

The PDF includes a visual route map that shows the same comparison in a more graphic way. It is useful as a quick reference when revising the main differences, the study path, and the career ladder.

Figure 2 in the PDF shows the beginner-to-advanced learning path, job growth, salary range, and role progression for both fields.

Where the jobs are

Software development has a very large job market because almost every company needs apps, websites, internal tools, or cloud services. The competition can be strong because many students enter the field, but the number of opportunities is also large.

Cybersecurity has a smaller talent pool and a very strong need. Organizations in banking, healthcare, government, SaaS, and large enterprises all need security talent. The demand is high because the cost of a breach can be huge.

Common job roles

  • Cybersecurity: SOC analyst, security analyst, security engineer, incident responder, penetration tester, cloud security analyst.
  • Software development: frontend developer, backend developer, full-stack developer, mobile developer, QA automation engineer.

Where students usually apply

  • LinkedIn Jobs for networking and direct applications.
  • Naukri.com for Indian openings.
  • Indeed for wider listings.
  • Company career pages for product companies and startups.
  • Internship platforms if you want hands-on early experience.

Money, growth, and long-term ceiling

At entry level, software development often starts a little easier because there are many beginner-friendly paths. Salary growth becomes stronger when you move into good engineering teams, master system thinking, and build real projects.

Cybersecurity may take longer to break into because employers want a stronger grounding in networks, systems, and practical security thinking. But once you build expertise, the career can become very valuable because security work is specialized and hard to outsource.

If your goal is faster entry and more obvious project visibility, software development is often the smoother start. If your goal is a specialist role with strong long-term relevance, cybersecurity can be the sharper bet.

Level Cybersecurity Software Development
Starting phase Often slightly higher if you have practical labs Broad range; easier entry in many teams
Mid-career Strong jump as expertise deepens Strong jump with product and system experience
Senior level Very strong due to specialization Very strong due to leadership and architecture

What a normal day looks like

A software developer's day

  • Review tasks or sprint goals.
  • Write code for a feature or fix a bug.
  • Test changes locally and in staging.
  • Join stand-up or team calls.
  • Review code and make improvements.

A cybersecurity professional's day

  • Check alerts and monitor logs.
  • Investigate suspicious activity.
  • Run scans or validate security controls.
  • Document findings and incident steps.
  • Work with other teams to reduce risk.

Software development tends to feel more project-building oriented. Cybersecurity tends to feel more observation, analysis, and defense oriented.

Real-world examples

Example 1: Startup frontend team

A young startup needs a landing page, onboarding screens, and quick UI improvements. A frontend developer can make visible progress fast, which helps the business and gives the developer rapid feedback.

Example 2: Banking security team

A bank's security team watches for suspicious logins, unusual traffic, and policy violations. The work can be stressful, but the impact is huge because the team is protecting money, data, and trust.

Example 3: Product company backend

A product company may need both: developers who build stable services and security people who make sure those services do not leak data or become easy targets. In bigger organizations, these teams often work closely together.

What to build for your portfolio

If you choose cybersecurity

  • Build a home lab with Linux and Windows virtual machines.
  • Do basic vulnerability assessments on your own lab systems.
  • Create a simple log-monitoring or alert-detection demo.
  • Document a penetration-testing lab walkthrough with screenshots.
  • Show that you understand risk, not just tools.

If you choose software development

  • Build a portfolio website or personal dashboard.
  • Create a small app with login, forms, and database storage.
  • Add one API-based project that uses real data.
  • Publish clean code on GitHub with a good README.
  • Show product thinking, not just coding.

Learning resources worth starting with

  • Cybersecurity: TryHackMe, Hack The Box, OWASP resources, Linux and networking basics.
  • Software development: freeCodeCamp, MDN, Python or Java courses, GitHub practice.
  • For both: learn Git, write notes, and build something after every major topic.

How to decide without overthinking

A simple way to choose is to look at the kind of work that feels naturally satisfying. If you enjoy creating screens, writing features, and seeing a user interface come alive, software development will probably feel more enjoyable.

If you enjoy spotting weak points, understanding attacks, reading logs, and thinking about how to stop problems before they happen, cybersecurity will probably feel more natural.

A good rule is to try both for a short period. Two to four weeks of basic practice in each field can tell you a lot about your interest and patience level.

Quick fit check

  • Choose cybersecurity if you like investigation, alerts, systems, and protection.
  • Choose software development if you like building, design, logic, and product features.
  • If you are undecided, start with software development and learn security basics alongside it.

A simple 6-month starting plan

  • Month 1: Learn the absolute basics and set up your tools.
  • Month 2: Build small hands-on exercises and keep notes.
  • Month 3: Finish one meaningful project and push it to GitHub.
  • Month 4: Create a second project and start applying for internships or junior roles.
  • Month 5: Improve your weak areas from feedback and practice.
  • Month 6: Target better opportunities and keep building in public.

The students who win are usually not the ones who learn the most theory. They are the ones who keep building, keep documenting, and keep improving steadily.

The short version

Software development is the cleaner entry into building tech products. Cybersecurity is the sharper specialist path for defending them. Both are strong career choices. The better one is the one you can stick with long enough to become genuinely good.

If you want a safe strategic start, learn development first, then add security awareness on top. That combination is powerful in the real market.

Web Design vs Python as a Career 2026

Web Design vs Python as a Career

A comprehensive Blog for students after Graduation

In this Blog we will compare Web Design and Python from a career perspective, including syllabus, roles, industry demand, job portals, company environments, portfolio projects, learning resources, and practical decision-making guidance.

1. Executive Summary

Web Design and Python both lead into the technology sector, but they reward different strengths. Web Design favors visual thinking, interface design, and user experience. Python favors logic, problem solving, automation, backend systems, data work, and AI. The best choice depends on whether the student wants a faster creative entry or a broader long-term technical ceiling.

In simple terms: Web Design gets you into building what users see, while Python gets you into building how software behaves underneath.

2. Core Comparison

Aspect Web Design Python
Nature Creative + technical Logical + analytical
Primary focus User interface and experience Logic, automation, and systems
Common tools HTML, CSS, JavaScript, Figma Python, Flask, Django, Pandas
Typical output Web pages, landing pages, UI screens APIs, scripts, backend services, data tools
Entry difficulty Lower Moderate
Long-term ceiling Good Very high

3. Syllabus Breakdown

3.1 Web Design Syllabus

  • HTML: semantic structure, forms, accessibility, page layout.
  • CSS: colors, spacing, typography, Flexbox, Grid, responsive design.
  • JavaScript: DOM manipulation, events, interactivity, basic APIs.
  • UI/UX basics: wireframes, design systems, user flow, usability.
  • Tools: Figma, VS Code, browser dev tools, Git/GitHub.

3.2 Python Syllabus

  • Syntax basics: variables, loops, conditions, functions.
  • Problem solving: patterns, recursion, complexity awareness.
  • Data structures: list, tuple, dictionary, set, string operations.
  • Object-oriented programming: classes, inheritance, abstraction.
  • Practical use: file handling, APIs, web frameworks, automation.
  • Specializations: backend development, data analysis, AI/ML.

4. Job Market and Demand

Web Design jobs are available in startups, agencies, service companies, and freelance markets. The challenge is that entry-level competition can be intense because many learners enter the field through tutorials and bootcamps.

Python jobs are available in backend engineering, automation, data science, analytics, fintech, product companies, and AI-heavy startups. The field often has a higher skill threshold, but it also offers more diversified long-term opportunities.

A practical way to think about it is: Web Design is usually easier to begin, while Python often has a stronger long-term technical ceiling.

5. Final Verdict

Web Design is an easier and faster entry point into tech. Python is a stronger long-term platform for serious technical growth. The best choice is the one that matches your personality today while still supporting your future goals.

If you want the safest strategic choice: start with Python, learn web basics alongside it, and keep building small projects.

Codeforces : From Newbie to Expert (1000-Rated)

 so ... I will be sharing all solutions here (recent solutions at the top, or find by ctrl+f)

                                


1000 Rated Problems Link : ProblemSet

Video Explanations : Check Here



16. Dreamoon and Stairs

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n, m; cin>>n>>m;
  5. if(n<m) cout<<-1;
  6. else cout<<(((n-1)/2/m)+1)*m;
  7. return 0;
  8. }



15. Olesya and Rodion

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n, t; cin>>n>>t;
  5. if(t==10){
  6. if(n==1) cout<<-1;
  7. else {
  8. cout<<1;
  9. for(int i=1; i<n; i++) cout<<0;
  10. }
  11. }
  12. else {
  13. for(int i=0; i<n; i++) cout<<t;
  14. }
  15. }



14. New Year Candles

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. int a, b; cin>>a>>b;
  6. int sum = a;
  7. while(a>=b){
  8. sum += a/b;
  9. a = a%b + a/b;
  10. }
  11. cout<<sum;
  12. }



13. Move Brackets

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. int t; cin>>t;
  6. while(t--){
  7. int n; string s; cin>>n>>s;
  8. int ans=0, cnt=0;
  9. for(auto &i:s){
  10. if(i=='(') cnt++;
  11. else cnt--;
  12. if(cnt<0) // ))(( ())( )()(
  13. { ans++; cnt=0;}
  14. }
  15. cout<<ans<<endl;
  16. }
  17. }



12. New Year Transportation

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. int n, t;
  6. cin>>n>>t;
  7. int a[n], flag=0;
  8. for(int i=1; i<n; i++) cin>>a[i];
  9.  
  10. for(int i=1; i<=t; i+=a[i]){
  11. if(i==t){
  12. cout<<"YES";
  13. flag=1; break;
  14. }
  15. }
  16. if(flag==0) cout<<"NO";
  17.  
  18. }



11.  Football

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n; cin>>n;
  5. string s[n];
  6. for(int i=0; i<n; i++) cin>>s[i];
  7. sort(s,s+n);
  8. cout<<s[n/2];
  9. }

                                                        OR

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. int n; cin>>n;
  6. map<string, int> m;
  7. for(int i=0; i<n; i++){
  8. string s; cin>>s;
  9. m[s]++;
  10. }
  11. int mx = 0; string ans;
  12. for(auto a:m)
  13. if(a.second > mx)
  14. mx = a.second, ans = a.first;
  15. cout<<ans;
  16. }


10. Raising Bacteria

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n; cin>>n;
  5. int ans=0;
  6. while(n>0) {
  7. ans += n & 1;
  8. n >>= 1;
  9. }
  10. cout<<ans<<endl;
  11. }


9. Xenia and Ringroad

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. int main(){
  5. ll n, m; cin>>n>>m;
  6. ll cnt=0, init=1;
  7. for(int i=0; i<m; i++) {
  8. int loc; cin>>loc;
  9. if(loc>=init) cnt+= loc-init;
  10. else cnt+= n-(init-loc);
  11. init = loc;
  12. }
  13. cout<<cnt;
  14. }



8. Dragons

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. int s, n; cin>>s>>n;
  6. pair<int, int> a[n];
  7. for(int i=0; i<n; i++)
  8. cin>>a[i].first>>a[i].second;
  9. sort(a, a+n);
  10. for(int i=0; i<n; i++)
  11. {
  12. if(s<=a[i].first) {cout<<"NO"; return 0; }
  13. else s+=a[i].second;
  14. }
  15. cout<<"YES";
  16. }



7. cAPS lOCK

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. string s; cin>>s;
  5. bool capslock = true;
  6. for(int i=1; i<s.length(); i++)
  7. if(s[i]>'Z') capslock=false;
  8.  
  9. if(capslock==true)
  10. for(int i=0; i<s.length(); i++)
  11. s[i]^=32;
  12.  
  13. cout<<s;
  14. }


6.  Expression

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int a, b, c, m;
  5. cin>>a>>b>>c;
  6. m = max({a+b+c, a*(b+c), (a+b)*c, a*b*c});
  7. cout<<m;
  8.  
  9. }



5. Lucky Division

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n; cin>>n;
  5. bool flag = 1;
  6. int a[12] = {4, 7, 47, 74, 44, 444, 447, 474, 477, 777, 774, 744};
  7. for(int i=0; i<12; i++)
  8. if(n%a[i]==0) flag=0;
  9. cout<<(flag==0?"YES":"NO");
  10. }


4. Chat room

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. string s; cin>>s;
  5. string h="hello";
  6. int c=0; //char in h
  7. for(int i=0; i<s.length(); i++){
  8. if(s[i]==h[c]) c++;
  9. if(c==5) { cout<<"YES"; return 0;}
  10. }
  11. cout<<"NO";
  12. }


3. Young Physicist

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n; cin>>n;
  5. int sx=0, sy=0, sz=0;
  6. int x[n], y[n], z[n];
  7. for(int i=0; i<n; i++){
  8. cin>>x[i]>>y[i]>>z[i];
  9. sx+=x[i], sy+=y[i], sz+=z[i];
  10. }
  11. cout<<(sx||sy||sz?"NO":"YES");
  12. }



2. String Task

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. string s; cin>>s;
  5. string v = "aeiouyAEIOUY";
  6. for(int i=0; i<s.length(); i++){
  7. int flag=1;
  8. for(int j=0; j<12; j++)
  9. if(s[i]==v[j]) flag=0;
  10. if(flag){
  11. if(s[i]<'a') s[i]+='a'-'A';
  12. cout<<"."<<s[i];
  13. }
  14. }
  15. }



1.  Theatre Square

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. int main(){
  5. ll n, m, a; cin>>n>>m>>a;
  6. n = n/a + (n%a!=0);
  7. m = m/a + (m%a!=0);
  8. cout<<n*m<<endl;
  9. }