Codeforces Round #386 (Div. 2), problem: (B) Decoding Solution in C/C++

Codeforces Round #386 (Div. 2), problem: (B) Decoding Solution in C/C++

#include<stdio.h>
int main(){
	int n,i;char a[2001];
	scanf("%d",&n);
	scanf("%s",a);
	n-=1;
	for(i=n-1;i>=0;i-=2)
	{ printf("%c",a[i]);
	}
	if(n%2==0)
		i=0;
	else
		i=1;
	for(i;i<=n;i+=2)
		printf("%c",a[i]);
	return 0;

}

Advertisement

spot_img

Jones wins inaugural ASBK...

The Australian Superbike Championship (ASBK) delivered high-octane drama this...

I Tried Cordless Stick...

📢 As an Amazon Associate, I earn from qualifying...

Post-quantum stocks soar in...

Post-Quantum Cryptography Stocks Surge Following Bitcoin Sell-Off Financial markets across...

I Tried Ergonomic Office...

📢 As an Amazon Associate, I earn from qualifying...

ACR’s Radiology AI Accreditation...

As artificial intelligence continues to expand its footprint in...

Dancing, insults can’t build...

According to a report by The Punch, Senior Advocate...

Jones wins inaugural ASBK Superpole Race as Toparis puts Yamaha R9 on pole

The Australian Superbike Championship (ASBK) delivered high-octane drama this weekend with the introduction of its inaugural Superpole Race. Spectators were treated to an electrifying...

I Tried Cordless Stick Vacuums For 30 Days Here Is the Honest Truth

📢 As an Amazon Associate, I earn from qualifying purchases.There comes a point in your routine when you realise enough is enough and my...

Post-quantum stocks soar in Hong Kong, mainland after security concerns spark bitcoin rout

Post-Quantum Cryptography Stocks Surge Following Bitcoin Sell-Off Financial markets across Hong Kong and mainland China experienced a dramatic sector rotation this week as investors poured...

I Tried Ergonomic Office Chairs For 30 Days Here Is the Honest Truth

📢 As an Amazon Associate, I earn from qualifying purchases.Upgrading my workspace routine changed everything, and it started with a simple realization that my...

ACR’s Radiology AI Accreditation Offers Health Systems a Benchmark for AI Inventory, Monitoring and Rollback

As artificial intelligence continues to expand its footprint in medical imaging, healthcare organizations face a profound operational shift. Deploying an imaging algorithm is no...

Dancing, insults can’t build Nigeria democracy – Okutepa

According to a report by The Punch, Senior Advocate of Nigeria (SAN) Jibrin Okutepa has stated that theatrical performances, dancing, and personal insults at...

I Tried Smart Security Cameras For 30 Days Here Is the Honest Truth

📢 As an Amazon Associate, I earn from qualifying purchases.After putting this through a proper 30-day real-world test, I finally understand why so many...

Chonky squirrel Stump wins 2026 Fat Squirrel Week

While Katmai National Park’s Fat Bear Week has long captured the internet's obsession with chubby wildlife preparing for hibernation, urban rodents are finally getting...

I Tried Noise Cancelling Earbuds For 30 Days Here Is the Honest Truth

📢 As an Amazon Associate, I earn from qualifying purchases.There comes a point in your routine when you realise enough is enough and the...