This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//List the folders using ls | |
echo shell_exec("ls / -ltr"); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() { | |
int m; | |
bool is_from_max_heap = true; | |
priority_queue<int, vector<int>> max_heap; | |
priority_queue<int, vector<int>, greater<int>> min_heap; | |
while (cin >> m) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
/* Solve the problem with double-linked list | |
* We just need to record and update the next position to insert | |
* the character. | |
*/ | |
int main() { | |
string line; | |
while (getline(cin, line)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ID: raining5 | |
PROG: wormhole | |
LANG: C++ | |
*/ | |
// Version 2 after reading the solution | |
#include <bits/stdc++.h> | |
#define N_MAX 12 | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by alice on 11/06/19. | |
// | |
/* | |
ID: raining5 | |
PROG: combo | |
LANG: C++ | |
*/ | |
/* LANG can be C++11 or C++14 for those more recent releases */ | |
#include <bits/stdc++.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by alice on 11/06/19. | |
// USACO 1.4 Wormholes | |
// AC | |
// | |
/* | |
ID: raining5 | |
PROG: wormhole | |
LANG: C++ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by alice on 08/06/19. | |
// UVa 861 - Little Bishops | |
// Accepted 0.000s | |
// | |
#define N 9 | |
#include <bits/stdc++.h> | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by alice on 27/05/19. | |
// g++ freckles_10034.cpp -o freckles.o | |
// uva - 10034 accepted | |
// | |
#include <bits/stdc++.h> | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
class Solution: | |
def accountsMerge(self, accounts): | |
""" | |
:type accounts: List[List[str]] | |
:rtype: List[List[str]] | |
""" | |
graph = defaultdict(set) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Definition for a point. | |
# class Point: | |
# def __init__(self, a=0, b=0): | |
# self.x = a | |
# self.y = b | |
# 68ms | |
# Definition for a point. | |
# class Point: | |
# def __init__(self, a=0, b=0): | |
# self.x = a |
NewerOlder