This file contains 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 cuenta(nums): | |
return reduce(lambda r, x : (x + 4 + r) if (x + 4 > 5) else (r), nums, 0) | |
if __name__ == '__main__': | |
print [1,2,3], "->", cuenta([1,2,3]) |
This file contains 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
/* | |
7303089 2014-08-01 04:51:42 apaapa 45D - Event Dates GNU C++ Accepted 30 ms 0 KB | |
*/ | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
#define forr(i,d,h) for (int i = (d); i < (h); ++i) | |
#define repeat(n) forr(___, 0, n) |
This file contains 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
/* | |
7303013 2014-08-01 04:22:45 apaapa 111A - Petya and Inequiations GNU C++ Accepted 374 ms 0 KB | |
*/ | |
#include <iostream> | |
using namespace std; | |
#define forr(i, d, h) for (int i = (d); i < (h); ++i) | |
unsigned long long int N, X, Y; |
This file contains 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 <cstdio> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
typedef vector<int> vi; | |
typedef vector<vi> vvi; | |
#define MAX_N 30 | |
#define MAX_OPTS 1000005 |
This file contains 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 <utility> | |
#include <algorithm> | |
using namespace std; | |
#define mp make_pair | |
typedef long long int lli; |
This file contains 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 <cstdio> | |
#include <algorithm> | |
using namespace std; | |
typedef long long int lli; | |
#define MAXN 100005 | |
lli N, K; | |
lli x[MAXN + 1]; |
This file contains 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
#define MIN(a,b) (((a) < (b)) ? (a) : (b)) | |
#ifndef SEED | |
#define SEED 1 | |
#endif | |
// Compile-time if then else | |
template<bool B, class T, class F> | |
struct ifthenelse { typedef T type; }; | |
NewerOlder