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 <string> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
constexpr int f(int a) {return a+a;} | |
int v[f(10)]; | |
class Cyclemin{public: | |
string bestmod(string s, int k) |
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
// http://community.topcoder.com/longcontest/?module=ViewProblemStatement&compid=48152&rd=16471 | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <functional> | |
#include <cctype> | |
#include <cstdlib> | |
#include <numeric> | |
#include <algorithm> |
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 solve(R, C, B): | |
ans = 0 | |
for cy in range(R): | |
for cx in range(C): | |
if B[cy][cx]!=".": | |
ok = [] | |
for d in range(4): | |
x = cx | |
y = cy | |
while True: |
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
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include <shellapi.h> | |
#include <tchar.h> | |
#include <locale.h> | |
#include <cstdio> | |
#include <vector> | |
#include <cassert> | |
#pragma comment(lib, "shell32.lib") |
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 check(R,C,W,B): | |
c = sum(b.count(1) for b in B) | |
for y in range(R): | |
for x in range(C-W+1): | |
if B[y][x:x+W].count(1)==c and B[y][x:x+W].count(-1)==0: | |
return True | |
return False | |
def BT(R,C,W,B): | |
Bt = tuple(tuple(b) for b in B) |
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 <vector> | |
#include <sstream> | |
#include <algorithm> | |
using namespace std; | |
class SmallPolygons | |
{ |
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
struct A { | |
int a; | |
}; | |
int main() | |
{ | |
A a; | |
int *p0 = &a.a; // OK | |
void *p1 = &a.a; // OK | |
int A::*p2 = &A::a; // OK |
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
struct A { | |
int a; | |
}; | |
int main() | |
{ | |
A a; | |
int *p0 = &a.a; // OK | |
void *p1 = &a.a; // OK | |
int A::*p2 = &A::a; // OK |
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
!function(){ | |
var R = 480; | |
document.querySelectorAll(".schedule_member_base_grn")[1].style.position="relative"; | |
var p=document.querySelectorAll(".user-grn"); | |
var n=p.length; | |
for (var i=0;i<n;i++) { | |
p[i].r = R*Math.sqrt(Math.random()); | |
p[i].th = 2*Math.PI*Math.random(); |
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
!function(){ | |
function render(){ | |
var t=performance.now()/1000; | |
document.querySelectorAll(".schedule_member_base_grn")[1].style.position="relative"; | |
var p=document.querySelectorAll(".user-grn"); | |
var n=p.length; | |
for(var i=0;i<n;i++){ | |
var s=p[i].style; | |
s.position="absolute"; | |
s.top=48*Math.sin(2*Math.PI*(i/n+t))+"px"; |