Skip to content

Instantly share code, notes, and snippets.

View glassrose's full-sized avatar
🦁
RESTing

Chandni Verma glassrose

🦁
RESTing
View GitHub Profile
@glassrose
glassrose / GCJ2019QR-YouCanGoYourOwnWay.cpp
Created April 7, 2019 13:27
My Solution for Problem 2 of the Google Code Jam 2019 Qualification Round | Dynamic Programming | O(N^2)
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
void dp(vector<vector<bool> >& passableVWalls, vector<vector<bool> >& passableHWalls, vector<vector<char> >& moveToHere) {
int n = passableVWalls.size();
for (int j=1; j<n; j++) {
@glassrose
glassrose / GCJ2019QR-ForgoneSolution.cpp
Created April 7, 2019 12:43
Solution for Problem 1 of Google Code Jam 2019 Qualification Round
#include <iostream>
#include <string>
using namespace std;
int main() {
int T;
string N;
cin>>T;
for (int t=1; t<=T; t++) {
cin>>N;