結果
| 問題 | 
                            No.1318 ABCD quadruplets
                             | 
                    
| コンテスト | |
| ユーザー | 
                            👑  tatyam
                         | 
                    
| 提出日時 | 2020-12-14 23:55:55 | 
| 言語 | C++17(gcc12)  (gcc 12.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                CE
                                 
                             
                            
                            (最新)
                                AC
                                 
                             
                            (最初)
                            
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,059 bytes | 
| コンパイル時間 | 2,723 ms | 
| コンパイル使用メモリ | 23,936 KB | 
| 最終ジャッジ日時 | 2025-01-17 00:37:40 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
            
            
            
            
            ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp:1:10: fatal error: testlib.h: No such file or directory
    1 | #include "testlib.h"
      |          ^~~~~~~~~~~
compilation terminated.
            
            ソースコード
#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(){
    registerValidation();
    int n, m;
    n = inf.readInt(1, 160000);
    inf.readSpace();
    m = inf.readInt(1, (int)sqrt(n));
    inf.readEoln();
    inf.readEof();
    int ans[1600001] = {};
    for(int a = 0; a <= m; a++) for(int b = 0; b <= a; b++) for(int c = 0; c <= b; c++) for(int d = 0; d <= c; d++){
        const int k = a * a + b * (a + b) + c * (a + b + c) + d * (a + b + c + d);
        if(k > n) break;
        if(a == b){
            if(b == c){
                if(c == d) ans[k] += 1;
                else ans[k] += 4;
            }
            else{
                if(c == d) ans[k] += 6;
                else ans[k] += 12;
            }
        }
        else{
            if(b == c){
                if(c == d) ans[k] += 4;
                else ans[k] += 12;
            }
            else{
                if(c == d) ans[k] += 12;
                else ans[k] += 24;
            }
        }
    }
    for(int i = 0; i <= n; i++) cout << ans[i] << '\n';
}
            
            
            
        
            
tatyam