#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;
typedef short i16;
typedef unsigned short u16;
typedef int i32;
typedef unsigned int u32;
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 <sstream> | |
#include <map> | |
#include <algorithm> | |
#include <cstdio> | |
#include <cctype> | |
// included bigint.h | |
#ifndef DODECAHEDRON_BIGINT_H_ | |
#define DODECAHEDRON_BIGINT_H_ |
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
/*input | |
175 | |
70 | |
*/ | |
#include <iostream> | |
int main(int argc, char const *argv[]){ | |
float height, weight; | |
std::cout<<"Your height (in centimeters): "; | |
std::cin>>height; |
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> | |
int main(int argc, char const *argv[]){ | |
short command; | |
unsigned int itemstotal = 5; | |
float total[2] = {0}; | |
struct Items{ | |
std::string name; | |
unsigned int price; |
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
/*input | |
36 | |
*/ | |
#include <iostream> | |
#include <cmath> | |
int main(int argc, char const *argv[]){ | |
int n; | |
std::cout<<"Calculate factor of: "; | |
std::cin>>n; |
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
macro_rules! input_vec { | |
() => { | |
input!() | |
.split_whitespace() | |
.map(|x| x.parse().unwrap()) | |
.collect() | |
}; | |
($delimiter:expr) => { | |
input!() | |
.split($delimiter) |
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> | |
bool is_palindrome(const std::string s){ | |
for(unsigned int i = 0; i < s.length()/2; i++){ | |
if(s[i] != s[s.length()-i-1]){ | |
return false; | |
} | |
} | |
return 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
#include <iostream> | |
#include <iomanip> | |
#include <fstream> | |
typedef unsigned short u16; | |
struct student { | |
std::string id; | |
u16 score1; | |
u16 score2; |
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> | |
struct Date { | |
short hour, minute, date, month, year; | |
}; | |
struct Customer{ | |
std::string name, address; | |
char gender; |
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> | |
int main(int argc, const char *argv[]){ | |
unsigned int money, chocolate_t, chocolate, coupon; | |
std::cin >> money; | |
coupon = money; | |
chocolate = money; | |
while(coupon >= 7){ | |
chocolate_t = coupon / 7; | |
chocolate += chocolate_t; |
OlderNewer