Skip to content

Instantly share code, notes, and snippets.

@EZLiang
Created October 16, 2025 20:18
Show Gist options
  • Select an option

  • Save EZLiang/50d98848ab4a0ea5db91de5e1c3b64b8 to your computer and use it in GitHub Desktop.

Select an option

Save EZLiang/50d98848ab4a0ea5db91de5e1c3b64b8 to your computer and use it in GitHub Desktop.
Official specification of Not C++
#include <iostream>
#include <string>
#include <utility>
#include <vector>
#include <iterator>
#include <stdlib.h>
// delimiters & blocks
#define def
#define define
#define procedure void
#define as {
#define do {
#define then {
#define ok }
#define with (
#define thanks }
#define thank );
#define thx ;
#define very
#define much
#define fi }
#define elihw }
#define fed }
#define rof }
#define scope {
#define epocs }
// constructs
#define call
#define run
#define give return
#define stop return;
#define please
#define set
#define output std::cout <<
#define in :
#define askfor std::cout <<
#define into ; std::cin >>
#define swap std::swap(
#define et ,
#define und <<
#define report return
#define success 0
#define failure 1
#define you
#define all auto
#define each auto&
#define newline "\n"
#define endline std::cout << "\n"
#define possibly if(rand() > RAND_MAX / 2)
// variables
#define let auto
#define var auto
#define equal =
#define to =
#define be =
#define create(X) X()
#define fresh(X) X()
#define a
#define copy
#define make
// operators
#define and &&
#define not !
#define or ||
#define inc ++
#define dec --
#define mod %
#define div /
#define times *
#define plus +
#define minus -
#define equals ==
#define less <
#define greater >
#define geq >=
#define leq <=
#define atmost <=
#define atleast >=
#define positive >0
#define negative <0
#define nonnegative >=0
#define nonpositive <=0
#define nonzero !=0
#define than
#define remains
// constants
#define zero 0
#define one 1
#define two 2
#define three 3
#define four 4
#define five 5
#define six 6
#define seven 7
#define eight 8
#define nine 9
#define ten 10
#define twenty 20
#define thirty 30
#define fourty 40
#define fifty 50
#define sixty 60
#define seventy 70
#define eighty 80
#define ninety 90
#define hundred 100
#define thousand 1000
#define million 1000000
// types
#define number double
#define integer int
#define boolean bool
#define list std::vector<
#define of
#define s >
#define len(X) X.size()
using str = std::string;
#define parseInt std::stoi
def str input(str prompt="") as
output prompt thx
str i;
std::cin >> i;
give i;
ok
#define upto ,
class range {
int hi = 0;
int lo = 0;
public:
range(int bb) {
hi = bb;
}
range(int aa, int bb) {
lo = aa;
hi = bb;
}
class iterator : public std::iterator<std::input_iterator_tag,int,int,const int*,int> {
int num = 0;
int sign = 1;
public:
explicit iterator(int _num = 0, int sgn = +1) : num(_num), sign(sgn) {}
iterator& operator++() { num+=sign; return *this; }
iterator operator++(int) { iterator retval = *this; ++(*this); return retval; }
bool operator==(iterator other) const { return num == other.num; }
bool operator!=(iterator other) const { return !(*this == other); }
reference operator*() const { return num; }
};
iterator begin() { return iterator(lo, (hi>lo)?1:-1); }
iterator end() { return iterator(hi); }
};
#define entrypoint int main(int _argc, char* _argv[]) { \
let argv be a fresh(list of str s) thx \
for (all i in range(_argc)) \
argv.emplace_back(_argv[i]) thx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment