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 <string> | |
#include <stack> | |
#include <queue> | |
#include <array> | |
#include <functional> | |
#include <vector> | |
using namespace std; | |
string table[5] = { "stack", "queue", "priority queue", "impossible", "not sure" }; |
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 <algorithm> | |
using namespace std; | |
#define LL long long int | |
LL n, h; | |
LL a, b, c, d, e; | |
// 質素な食事の最低限の回数が求められる | |
inline LL minCheapFood(double x){ |
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 <string> | |
#include <cstring> | |
#include <algorithm> | |
#include <vector> | |
#include <cstdlib> | |
#include <iomanip> | |
#include <sstream> | |
using namespace std; |
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 <algorithm> | |
using namespace std; | |
enum { | |
B10 = 10000, B5 = 5000, B1 = 1000 | |
}; | |
inline bool isCorrect(int x10, int x5, int x1, int n, long y){ | |
bool isPositive = ((x10 >= 0) && (x5 >= 0) && (x1 >=0)); |
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
import numpy as np | |
import matplotlib.pylab as plt | |
def sigmoid(x): | |
return 1 / (1 + np.exp(-x)) | |
x = np.arange(-5.0, 5.0, 0.1) # -5.0から5.0まで0.1刻みで生成 | |
y = sigmoid(x) | |
plt.plot(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 <iostream> | |
using namespace std; | |
int main() { | |
int n, balls[10]; cin >> n; | |
while(n--){ | |
for(int i = 0; i < 10; i++) cin >> balls[i]; | |
bool sortable = false; | |
for(int i = 0; i < (1 << 10); i++){ |