全部评论 4

  • 开火车头,放洛谷上就开不成了

    2024-07-02 来自 上海

    1
  • #include <iostream>
    using namespace std;
     
    int main() {
        int a,b;
        cin >> a >> b;
    	cout << a+b;
    
    	return 0;
    }
    

    2024-07-02 来自 浙江

    0
    • 这样不就OK了吗

      2024-07-02 来自 浙江

      0
    • 错误的,应该是

      //前面一大堆头文件省略
      #define int long long
      using namespace std;
      std::random_device rd;
      unsigned int seed = rd();
      std::mt19937 engine(seed);
      char *p1, *p2, buf[100000];
      #define nc() (p1==p2 && (p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++)
      int read() {
      	int x = 0, f = 1;
      	char ch = nc();
      	while (ch < 48 || ch > 57) {
      		if (ch == '-')
      			f = -1;
      		ch = nc();
      	}
      	while (ch >= 48 && ch <= 57)
      		x = x * 10 + ch - 48, ch = nc();
      	return x * f;
      }
      void write(int x) {
      	if (x < 0)
      		putchar('-'), x = -x;
      	if (x > 9)
      		write(x / 10);
      	putchar(x % 10 + '0');
      	return;
      }
      int sum,nextt[4][2]={1,0,0,1,-1,0,0,-1};
      int mp[100][100];
      bool vis[100][100];
      void dfs(int x, int y) {
      //	cout<<x<<" "<<y<<endl;
          sum+=mp[x][y];
      	vis[x][y]=1;
      	for(int i=0;i<4;i++){
      		int dx=x+nextt[i][0],dy=y+nextt[i][1];
      		if(dx>=0&&dx<=99&&dy>=0&&dy<=99&&vis[dx][dy]==false){
      //			vis[dx][dy]=1;
      			
      			dfs(dx,dy);
      //			vis[dx][dy]=0;
      		}
      	} 
      }
      signed main() {
      	ios::sync_with_stdio(false);
      	cin.tie(0), cout.tie(0);
      	int x,y;
      	cin>>x>>y;
      	mp[rand() % 100][rand() % 100] = x;
      	mp[rand()*10086 % 100][rand()*114514 % 100] = y;
      	dfs(rand() % 100,rand() % 100);
      //	cout<<1<<endl;
      	cout<<sum<<endl;
      	return 0;
      }
      

      (不是)

      2024-07-02 来自 广东

      0
    • 我写的是a加B problem

      2024-07-02 来自 浙江

      0
  • 我觉得还是用万能头吧,现在看的有点多

    2024-07-01 来自 浙江

    0
    • 我手贱,偏要把万能头拆开写在模板里,正常人打个万能头绰绰有余

      2024-07-01 来自 浙江

      0
  • 很好,看不懂(

    2024-07-01 来自 辽宁

    0

热门讨论