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 <iostream> | |
| #include <vector> | |
| using namespace std; | |
| struct X | |
| { | |
| int val; | |
| void out(const string& s, int nv) { |
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 <iostream> | |
| #define MAX_N 20 | |
| using namespace std; | |
| int a[MAX_N]; | |
| int n, k; | |
| bool dfs(int i, int sum) { |
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 <iostream> | |
| #include <fstream> | |
| #define N 10 | |
| #define M 12 | |
| using namespace std; | |
| char lake[10][12]; |
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
| using namespace std; | |
| enum Color { | |
| red, green, blue, | |
| white = 10, black = white, | |
| silver, gold = 99 | |
| }; | |
| int main() | |
| { |
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 <iostream> | |
| #include <string> | |
| using namespace std; | |
| int N, M; | |
| string S, T; | |
| int calc(int n, int m) { | |
| if (n == N || m == 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 <iostream> | |
| #include <string> | |
| #include "../d.h" | |
| using namespace std; | |
| int N, M; | |
| string S, T; | |
| int dp[1001][1001]; |
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 <iostream> | |
| #include <string> | |
| #include "../d.h" | |
| using namespace std; | |
| int N, M; | |
| string S, T; | |
| int dp[1001][1001]; |
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
| def decompress(args) | |
| ans = [] | |
| args.each do |a| | |
| if a.is_a? Array | |
| ans.push a.last*a.first | |
| else | |
| ans.push a | |
| end | |
| end | |
| ans.join("") |
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
| template<typename Container, typename Value> | |
| Value sum(const Container& c, Value v) | |
| { | |
| for (auto x : c) | |
| v += x; | |
| return v; | |
| } |
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 <iostream> | |
| #include <string> | |
| using namespace std; | |
| class person { | |
| private: | |
| int age; | |
| string name; | |
| public: |