Skip to content

Instantly share code, notes, and snippets.

🤠
Learning

Himanshu Singh lazycipher

🤠
Learning
Block or report user

Report or block lazycipher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lazycipher
lazycipher / 69A - Young Physicist.cpp
Created Oct 9, 2019
69A - Young Physicist Solution in C++
View 69A - Young Physicist.cpp
#include<iostream>
int main(){
int n, x, y, z, xf(0), yf(0) ,zf(0);
std::cin>>n;
for(int i=0; i<n; i++){
std::cin>>x>>y>>z;
xf+=x;
yf+=y;
zf+=z;
@lazycipher
lazycipher / 58A - Chat room.cpp
Last active Oct 9, 2019
CodeForces 58A - Chat room Solution in C++
View 58A - Chat room.cpp
#include<iostream>
int main(){
std::string word, hello="hello";
std::cin>>word;
int j=0, pas=0;
for(int i=0; i<word.length();i++){
if(word[i]==hello[j]){
j++;
pas++;
@lazycipher
lazycipher / balance.js
Created Aug 30, 2019
Balanced Brackets in JavaScript
View balance.js
var string = "{[([)]]}";
var balance = true;
var check = {
"[":"]",
"{":"}",
"(":")",
}
var record = []
@lazycipher
lazycipher / 266A - Stones on the Table.cpp
Created Aug 9, 2019
266A - Stones on the Table in C++
View 266A - Stones on the Table.cpp
#include<iostream>
int main(){
int stones_count, count=0;
std::string stones;
std::cin>>stones_count;
std::cin>>stones;
for(int i=1; i<stones_count;i++){
if(stones[i] == stones[i-1]){
count++;
@lazycipher
lazycipher / 263A - Beautiful Matrix.cpp
Created Aug 9, 2019
263A - Beautiful Matrix Solution in CPP
View 263A - Beautiful Matrix.cpp
#include<iostream>
int main(){
int arr[5][5];
int x,y;
for(int i=0; i<5; i++){
for(int j=0; j<5; j++){
std::cin>>arr[i][j];
if(arr[i][j]!=0){
x=i+1;
@lazycipher
lazycipher / 96A-Football-Solution.cpp
Created Jun 7, 2019
Codeforces 96A Football Solution C++
View 96A-Football-Solution.cpp
#include<iostream>
using namespace std;
int main(){
string s1;
cin>>s1;
int condition = 1;
for(int i=1; i<=s1.length(); i++){
if(s1[i] == s1[i-1]){
@lazycipher
lazycipher / petyaAndStrings.cpp
Created Jun 7, 2019
112A Petya and Strings Solution C++
View petyaAndStrings.cpp
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string s1, s2;
int res;
cin>>s1>>s2;
@lazycipher
lazycipher / 231A-Team.cpp
Created Jun 6, 2019
231A Team Codeforces Solution in C++
View 231A-Team.cpp
#include<iostream>
using namespace std;
int main(){
int count = 0, p, v, t, n;
cin>>n;
while(n){
cin>>p>>v>>t;
if(p+v+t>=2){
count++;
@lazycipher
lazycipher / a-string.cpp
Created Jun 6, 2019
118A A String Codeforces Solution in C++
View a-string.cpp
#include<iostream>
#include<string>
using namespace std;
int main(){
string s1, s2;
cin>>s1;
for(int i=0; i<s1.length(); i++){
if(s1[i]=='a' || s1[i]=='e' || s1[i]=='i' || s1[i]=='o' || s1[i]=='u' || s1[i]=='A' || s1[i]=='E' || s1[i]=='I' || s1[i]=='O' || s1[i]=='U' || s1[i]=='Y' || s1[i]=='y'){
@lazycipher
lazycipher / nextRound.cpp
Created May 31, 2019
158A - Next Round CodeForces
View nextRound.cpp
#include<iostream>
#include<string>
using namespace std;
int main(){
int n, k;
int scores[50];
int count = 0, score;
cin>>n>>k;
You can’t perform that action at this time.