粉褔

这是粉褔&征求帖!

请把建议打在评论区


征求建议区


以下是表格:

数量 粉褔 是否达成
11 姓名缩写 \color{green}{√}
55 坐标+学校 \color{green}{√}
1010 年龄 \color{green}{√}
2020 生日 \color{green}{√}
5050 完整姓名 \color{green}{√}
100100 爆照 \color{green}{√}
150150 20问答 \color{green}{√}
200200 姗姗来迟的码风 \color{green}{√}
250250 开盒 @39ccc \color{green}{√}
300300 开 @39ccc の照 \color{green}{√}
400400 ? \color{green}{√}
500500 女装!!! \color{green}{√}
11452\lceil\frac{1145}2\rceil ? \color{green}{√}
114+514114+514 ? \color{red}{√}
191911451919-1145 ? ×\color{red}{×}

?表示还不确定


以下是粉褔专区:

1fan:

jzk

5fans:

浙江·绍兴·嵊州+嵊州市爱德小学(以前叫嵊州市爱德外国语学校)

10fans:

虚岁12,周岁11

20fans:

阴历:六月初六

阳历:2012.7.24

50fans:

金子开

100fans:

我现在在机房,没有摄像头,晚上回家拍(

于2024.1.8隐藏链接注意,只是隐藏链接,图片网址还在本页面,快按下F12寻找吧~

150fans:

link 已经在表格了

200fans:

先放目前缺省源(已经不拿宏定义整活了,不过提交的代码中可能还有):

# include <bits/stdc++.h>

# define ffor(i,name) \
    for (auto i = name.begin (); i != name.end (); ++ i)

using namespace std;

typedef long long ll;

typedef pair <int, int> pii;

int main () {

    ios::sync_with_stdio (0);

    cin.tie (0);

    cout.tie (0);

    //

    return 0;

}
  1. 除非要保留小数(你说得对cout可以保留小数,但是那函数我没记。),其它情况都用关同步+cin+cout
  2. 始终使用万能头(疑似反啸粥老尸?)
  3. 能用 bool 就不用 int省空间
  4. void 就不设返回值,避免出错
  5. 因为被小熊猫dev整的所以喜欢排版
  6. 基本打一行空一行,方便调试
  7. 除非条件太多,其它情况直接逗号分割
  8. 从不用 switch+case,只用 elseif 或三目表达式
  9. 能定义全局就定义全局
  10. 只用 structclass+public 不会用
  11. 全局变量定义顺序优先级:
    1. const 常量
    2. struct
    3. 普通变量&普通数组
    4. 各类STL
    5. 各种函数
  12. 其它具体看下面代码吧(dij模板题):
    # include <bits/stdc++.h>
    
    # define for_stl(i,stl_name) \
    	for (auto i = stl_name.end (); i != stl_name.end (); i ++)
    
    using namespace std;
    
    typedef long long ll;
    
    typedef pair <int, int> pii;
    
    struct node {
    
    	int x, dis;
    
    	bool operator < (const node& t) const {
    
    		return dis > t.dis;
    
    	}
    
    } t;
    
    const int inf = (1ll << 31) - 1;
    
    int n, m, s, d[100005], x, y, z;
    
    vector <pii> v[100005];
    
    priority_queue <node> q;
    
    void dij () {
    
    	fill (d + 1, d + 1 + n, inf);
    
    	d[s] = 0;
    
    	q.push ({s, 0});
    
    	while (! q.empty ()) {
    
    		t = q.top ();
    
    		q.pop ();
    
    		if (t.dis > d[t.x])
    			continue ;
    
    		for (pii i : v[t.x])
    			if (d[i.first] > d[t.x] + i.second)
    				q.push ({i.first, d[i.first] = d[t.x] + i.second});
    
    	}
    
    	return ;
    
    }
    
    int main () {
    
    	ios::sync_with_stdio (0);
    
    	cin.tie (0);
    
    	cout.tie (0);
    
    	cin >> n >> m >> s;
    
    	for (int i = 0; i < m; ++ i)
    		cin >> x >> y >> z, v[x].push_back ({y, z});
    
    	dij ();
    
    	for (int i = 1; i <= n; ++ i)
    		cout << d[i] << ' ';
    
    	return 0;
    
    }

250fans:

39ccc真名:章景航

300fans:

39ccc照片:这其实是他被老师抓去当证人了,然后就被我拍了(

400fans:

500fans:

(和JZX学的(


upd:2023.11.1进行史无前例的大翻新,并删除所有评论

posted @ 2023-09-13 13:32  Vitamin_B  阅读(9)  评论(0)    收藏  举报  来源