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
-- Detect if the Safari window exists | |
tell application "System Events" | |
if not (exists (front window of process "Safari")) then | |
return | |
end if | |
end tell | |
-- Assume the frontmost Finder window (or the Desktop) | |
-- is where we want to store the script. | |
try |
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> | |
#define IOS std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); | |
// #define __DEBUG__ | |
#ifdef __DEBUG__ | |
#define DEBUG(...) printf(__VA_ARGS__) | |
#else | |
#define DEBUG(...) | |
#endif | |
#define filename "" |
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++> | |
/Meisell-Lehmer | |
const int MAX_N = 5e6 + 2; | |
bool np[MAX_N]; | |
int prime[MAX_N], pi[MAX_N]; | |
int getprime() | |
{ | |
int cnt = 0; | |
np[0] = np[1] = true; | |
pi[0] = pi[1] = 0; |
NewerOlder