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 <cstdio> | |
using namespace std; | |
#define CONCAT(a, b) a##b | |
#define file_type CONCAT(FI, LE) | |
#define file_open CONCAT(fo, pen) | |
#define file_scanf CONCAT(fs, canf) |
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 <cstdio> | |
using namespace std; | |
#define CONCAT(a, b) a##b | |
#define file_type CONCAT(FI, LE) | |
#define file_open CONCAT(fo, pen) | |
#define file_scanf CONCAT(fs, canf) |
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> | |
using namespace std; | |
int main(int argc, char const *argv[]) | |
{ | |
const int MAX = 102; | |
const int STEP[4][2] = {{0, -1}, {-1, 0}, {0, 1}, {1, 0}}; | |
int matrix[MAX][MAX] = {0}; | |
int n, x, y, s = 0, sum = 0; |
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 <stdexcept> | |
#include <string> | |
#include <sstream> | |
#include <cmath> | |
using namespace std; | |
class parse_error : exception { | |
string msg; | |
public: | |
parse_error(const char * str) : msg(str) { } |
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
template <typename integral> | |
std::string to_string(integral value, int base = 10, bool lower_case = true) { | |
const char * digit = lower_case ? "0123456789abcedfghijklmnopqrstuvwxyz" | |
: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
assert(2 <= base && base <= 36); | |
std::string str; | |
bool negative = false; |
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
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.IO; | |
using System.Text; | |
using System.Threading; | |
using System.Xml; | |
namespace Microsoft.MicrosoftMath | |
{ | |
internal struct UInteger : IComparable<UInteger>, IEquatable<UInteger> |
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
// Type definition | |
class Object { | |
public: | |
int key1, key2, key3, key4; | |
}; | |
// Comparator | |
bool comparator(const Object & lhs, const Object & rhs) { | |
if (lhs.key1 == rhs.key1) { | |
if (lhs.key2 == rhs.key2) { |
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
\documentclass{ctexart} | |
\usepackage[margin=1.5cm]{geometry} | |
\usepackage{CJK} | |
\usepackage{verbatim} | |
\DeclareMathSizes{12}{20}{14}{10} | |
\title {东营市第一中学信息学信息学奥赛第一次模拟赛题解} | |
\author {作者:做好事不留名} | |
\begin{document} | |
\maketitle | |
作者说:我只是来练习\LaTeX 排版系统的。 |
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> | |
using namespace std; | |
const int N = 5000 + 1; | |
int n, m, q, pre[N], rank[N] = { 0 }; | |
int get_father(int x) { | |
if (pre[x] == x) |
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 <algorithm> | |
#include <cmath> | |
#include <iomanip> | |
using namespace std; | |
const int N = 100000; | |
inline double square(double x) { |
OlderNewer