跳到正文

个人记录

Different World

月离约 14 分钟
原文
文章信息与版本

文章信息

发布
2019年11月5日
收录
2026年4月3日
更新
2026年11月14日
篇幅
约 14 分钟

版本

  1. v2当前
  2. v1

打了一个半小时,终于打出来了

如果编译听上去节奏明显不对,我也不知道怎么办,等等多试几次就好了

C++
#include<windows.h>
#include<cstdio>
#define __REP 800
#define sL1 277
#define sL2 311
#define sL4 370
#define sL5 415
#define sL6 466
#define sN1 554
#define sN2 622
#define sN4 740
#define sN5 831
#define sN6 932
#define sH1 1046
#define sH2 1245
#define sH4 1480
#define sH5 1661
#define sH6 1865
#define L1 262
#define L2 294
#define L3 330
#define L4 349
#define L5 392
#define L6 440
#define L7 493
#define N1 532
#define N2 588
#define N3 660
#define N4 698
#define N5 784
#define N6 880
#define N7 988
#define H1 1046
#define H2 1175
#define H3 1319
#define H4 1397
#define H5 1568
#define H6 1760
#define H7 1976
#define b(x,y) Beep(x,y*__REP);
#ifdef __REP
class music{
private:
    inline int Different_World(){
    	b(N1,0.25)b(N4,0.25)b(N3,0.5)b(N1,1)b(0,0.5)b(0,0.5)b(N6,0.5)b(N3,0.5)b(N2,2)b(0,0.5)b(N2,0.5)b(N4,0.5)b(N3,0.5)
    	b(N1,0.25)b(N4,0.25)b(N3,0.5)b(N1,1)b(0,0.5)b(0,0.5)b(N6,0.5)b(N3,0.5)b(N2,2)b(0,0.5)b(N2,0.5)b(N4,0.5)b(N3,0.5)
    	//pre
		b(N1,0.5)b(N2,0.5)b(N3,1)
		//All we know
		b(N1,0.5)b(L6,0.5)b(N4,1)
		//Left untold
		b(N2,0.5)b(N2,0.5)b(N7,0.5)b(N5,0.5)b(N2,0.5)b(N1,0.5)b(L7,1)
		//Beaten by a broken dream
		b(N1,0.5)b(N2,0.5)b(N3,1)
		//Nothing like
		b(N1,0.5)b(L6,0.5)b(N4,0.5)b(N3,0.5)b(N2,1)b(N4,0.5)b(N3,0.5)b(N2,1)b(N2,0.25)b(N3,0.75)
		//What it used to be
        b(N3,0.5)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N6,0.5)b(N6,0.75)
        //We’ve been chasing our demons down an empty road
		b(N5,0.5)b(N2,0.5)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N5,0.5)b(N5,1)b(0,0.25)
        //Been watching our castle turning into dust
        b(N3,0.5)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N6,0.5)b(N6,0.75)b(N5,0.5)b(N2,1)b(0,0.75)
        //Escaping our shadows just to end up here once more
		b(N3,0.25)b(N3,0.5)b(H1,0.5)b(N7,0.5)b(N6,0.5)
		//And we both know
        b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.75)b(N6,0.25)b(N5,0.5)
        //This is not the world we had in mind
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)
        //But we got time
        b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,1)b(N5,0.5)
        //We are stuck on answers we can’t find
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)b(0,0.5)
		//But we got time
        b(H1,0.25)b(N7,0.25)b(H1,0.25)b(N7,0.25)b(N5,0.25)b(N3,0.25)b(N5,0.25)b(N6,0.5)b(N6,0.75)b(N5,0.5)
        //And even though we might have lost tonight
        b(N2,0.5)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N5,0.5)b(N5,1)b(0,0.25)
        //The skyline reminds us of a different time
        b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.75)b(N6,0.25)b(N5,0.5)
        //This is not the world we had in mind
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)
        //But we got time
        b(N1,0.5)b(N2,0.5)b(N3,1)
        //Broken smiles
        b(N1,0.5)b(L6,0.5)b(N4,1)
        //Tired eyes
        b(N2,0.5)b(N2,0.5)b(N7,0.5)b(N5,0.5)b(N2,0.5)b(N1,0.5)b(L7,1)
        //I can feel your longing heart
        b(N1,0.5)b(N2,0.5)b(N3,1)
        //Call my name
        b(N1,0.5)b(L6,0.5)b(N4,0.5)b(N3,0.5)b(N2,0.75)b(N1,0.25)b(L7,0.5)b(H1,0.5)b(N7,0.75)b(H1,0.25)b(N2,0.25)b(N3,0.75)
		//Howling from afar
		b(N3,0.5)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N6,0.5)b(N6,0.75)
		//We’ve been fighting our demons just to stay afloat
		b(N5,0.5)b(N2,0.5)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N5,0.5)b(N5,1)b(0,0.25)
		//Been building our castle just to watch it fall
		b(N3,0.5)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N2,0.25)b(N3,0.25)b(N6,0.5)b(N6,0.75)b(N5,0.5)b(N2,1)b(0,0.75)
		//Been running forever just to end up here once more
		b(N3,0.25)b(N3,0.5)b(H1,0.5)b(N7,0.5)b(N6,0.5)
		//And now we know
		b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.75)b(N6,0.25)b(N5,0.5)
        //This is not the world we had in mind
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)
        //But we got time
        b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,1)b(N5,0.5)
        //We are stuck on answers we can’t find
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)b(0,0.5)
		//But we got time
        b(H1,0.25)b(N7,0.25)b(H1,0.25)b(N7,0.25)b(N5,0.25)b(N3,0.25)b(N5,0.25)b(N6,0.5)b(N6,0.75)b(N5,0.5)
        //And even though we might have lost tonight
        b(N2,0.5)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N5,0.5)b(N5,1)b(0,0.25)
        //The skyline reminds us of a different time
        b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.75)b(N6,0.25)b(N5,0.5)
        //This is not the world we had in mind
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)b(0,4)
        //But we got time
        b(N1,1)b(N1,1)b(N1,1)
        //Take me back
		b(N3,0.375)b(N4,0.375)b(N3,0.25)b(L7,1)b(L7,1)b(L7,1)
		//Back to the mountain side
        b(L7,0.375)b(N2,0.375)b(N1,0.25)b(N1,1)b(N1,1)b(N1,1)
		//Under the northern lights
		b(N3,0.375)b(N4,0.375)b(N3,0.25)b(L7,2)b(0,2)
		//Chasing the stars
		b(N1,1)b(N1,1)b(N1,1)
        //Take me back
		b(N3,0.375)b(N4,0.375)b(N3,0.25)b(L7,1)b(L7,1)b(L7,1)
		//Back to the mountain side
        b(L7,0.375)b(N2,0.375)b(N1,0.25)b(N1,1)b(N1,1)b(N1,1)
		//When we were full of life
		b(N3,0.375)b(N4,0.375)b(N3,0.25)b(L7,1)b(0,0.75)
		//Back to the start
		b(L7,0.25)b(L7,0.5)b(N2,0.5)b(N1,0.5)b(L7,0.5)
		//We both know that
		b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.75)b(N6,0.25)b(N5,0.5)
        //This is not the world we had in mind
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)
        //But we got time
        b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,1)b(N5,0.5)
        //We are stuck on answers we can’t find
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)b(0,0.5)
		//But we got time
        b(H1,0.25)b(N7,0.25)b(H1,0.25)b(N7,0.25)b(N5,0.25)b(N3,0.25)b(N5,0.25)b(N6,0.5)b(N6,0.75)b(N5,0.5)
        //And even though we might have lost tonight
        b(N2,0.5)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N1,0.25)b(N2,0.25)b(N5,0.5)b(N5,1)b(0,0.25)
        //The skyline reminds us of a different time
        b(H1,0.75)b(N7,0.25)b(H1,0.75)b(N7,0.25)b(H1,0.5)b(H3,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.75)b(N6,0.25)b(N5,0.5)
        //This is not the world we had in mind
        b(0,0.25)b(N7,0.25)b(N7,0.5)b(H2,0.5)b(H1,0.5)b(N7,0.5)
        //But we got time
    }
public:
    inline void cab(int op){
        op==4&&Different_World();
    }
};
#endif
signed main(void){
    music a;
    a.cab(4);
    return 0;
}
原文
抓取于
  1. Ukraine

    orz