专栏文章
码风
个人记录参与者 1已保存评论 0
文章操作
快速查看文章及其快照的属性,并进行相关操作。
- 当前评论
- 0 条
- 当前快照
- 1 份
- 快照标识符
- @miqcsxwt
- 此快照首次捕获于
- 2025/12/04 02:41 3 个月前
- 此快照最后确认于
- 2025/12/04 02:41 3 个月前
VS:
main
CPP#include <iostream>
#include "head_1.h"
#include "head_2.h"
#include "head_3.h"
using namespace std;
__int32 main ( ) {
/*__int32 a = IN::READS ( );
printer.print ( a );
printer.print ( "\n" );*/
system ( "pause" );
return 0;
}
head_1:
CPP#pragma once
#include <iostream>
#include <string>
using namespace std;
namespace equ {
double add ( double a , double b ) {
return a + b;
}
double sub ( double a , double b ) {
return a - b;
}
double mul ( double a , double b ) {
return a * b;
}
double div ( double a , double b ) {
return a / b;
}
double mod ( double a , double b ) {
return a - a / b * b;
}
double auto_inc ( double a ) {
return a + 1;
}
double auto_dec ( double a ) {
return a - 1;
}
}
head_2
CPP#pragma once
#include <iostream>
#include <string>
#include <cstdio>
#include <sstream>
class SafePrinter {
public:
template<typename T>
void print ( const T &value ) {
std::ostringstream oss;
oss << value;
printf ( "%s" , oss.str ( ).c_str ( ) );
}
void print ( const std::string &str ) {
std::printf ( "%s" , str.c_str ( ) );
}
void print ( const char *str ) {
std::printf ( "%s" , str );
}
};
SafePrinter printer;
head_3:
CPP#pragma once
#include <iostream>
#include <string>
class IN {
public:
template<typename T>
static T READC ( ) {
T value;
std::cin >> value;
return value;
}
static int READS ( ) {
__int32 value;
scanf_s ( "%d" , &value );
return value;
}
};
DEV(老式马蜂):
CPP#include <bits/stdc++.h>
using namespace std;
inline long long inputI( )
{
long long x = 0, f = 1; char ch = getchar( );
while( ch < '0' || ch > '9' )
{
if ( ch == '-' )
f = -1;
ch = getchar( );
}
while( ch >= '0' && ch <= '9' )
{
x = x * 10 + ch - '0';
ch = getchar( );
}
return x * f;
}
int main( int argc, char *argv [ ] )
{
return 0;
}
相关推荐
评论
共 0 条评论,欢迎与作者交流。
正在加载评论...