Sponsors

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 – Elimination Round 3), problem: (C) Santa Claus and Robot Solution in C/C++

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 – Elimination Round 3), problem: (C) Santa Claus and Robot Solution in C/C++

#include <iostream>
using namespace std;

int n,s;
char a,d,l;

int main(){
cin>>n;
for(int i=0; i<n; i++){
cin>>a;
if((a==’R’ && l==’L’) || (a==’L’ && l==’R’) || (a==’U’ && d==’D’) || (a==’D’ && d==’U’)){
d=’a’;
l=d;
s++;
}
if(a==’R’ || a==’L’) l=a;
else d=a;
}
cout<<s+1;
return 0;
}

 

Gold loans grow 128%,...

Gold Loans Witness Explosive 128% Growth as Outstandings Surpass...

Lottery Unlocked 2026: AI...

Lottery Unlocked 2026: A Deep Dive into AI Accuracy...

How to be proactive...

Taking Charge: How to be Proactive About Cancer Prevention Every...

Workday’s stock slumps again...

Workday Shares Plunge as Future Outlook Dims Amid AI...

Milan Cortina Olympics Attracts...

Milan Cortina Olympics Sees Record-Breaking Viewership and PerformanceThe Milan...

New York City’s Last...

New York City Nurses Reach Historic Agreement Ending Major...

Gold loans grow 128%, outstandings cross 4 lakh crore

Gold Loans Witness Explosive 128% Growth as Outstandings Surpass ₹4 Lakh Crore India's financial landscape is witnessing a dramatic surge in gold-backed lending, signaling a...

Lottery Unlocked 2026: AI Accuracy Claims Examined, Pricing Verified, and What Consumers Should Confirm Before Buying

Lottery Unlocked 2026: A Deep Dive into AI Accuracy and Pricing ClaimsThe intersection of artificial intelligence and the lottery industry has reached a new...

How to be proactive about cancer prevention

Taking Charge: How to be Proactive About Cancer Prevention Every year, millions of families are affected by cancer, yet a startling statistic offers a glimmer...

Workday’s stock slumps again on weak guidance and AI disruption fears

Workday Shares Plunge as Future Outlook Dims Amid AI Concerns Workday Inc. (WDAY), a long-standing leader in the enterprise cloud applications market for finance and...

Milan Cortina Olympics Attracts 23.5 Million Viewers Across NBCUniversal and Versant Outlets, Best Winter Games Since 2014

Milan Cortina Olympics Sees Record-Breaking Viewership and PerformanceThe Milan Cortina Winter Olympics have officially concluded, leaving a lasting impact on both sports history and...

New York City’s Last Striking Nurses Approve New Contract

New York City Nurses Reach Historic Agreement Ending Major StrikeIn a significant development for the healthcare sector in New York City, nurses at the...

Predator: Bloodshed #1 Preview: Alien Invader Crashes Fight Club

The Hunt Intensifies: Predator: Bloodshed #1 Takes the Yautja to an Underground Arena Marvel Comics continues to push the boundaries of the Predator franchise, and...

Menstrual pads and tampons can contain toxic substances – here’s what to know about this emerging health issue

The Hidden Risks in Your Period Products For decades, menstrual products like tampons and pads have been treated as basic hygiene essentials, used by nearly...

Taalas raises $169M in funding to develop model-specific AI chips

Taalas Secures $169M to Revolutionize AI with Model-Specific ChipsThe landscape of artificial intelligence hardware is witnessing a seismic shift as Taalas Inc., a burgeoning...